Documentation ¶
Index ¶
- func Distance(latA, lngA, latB, lngB float64) float64
- func GCJtoWGS(gcjLat, gcjLng float64) (wgsLat, wgsLng float64)
- func GCJtoWGSExact(gcjLat, gcjLng float64) (wgsLat, wgsLng float64)
- func WGStoGCJ(wgsLat, wgsLng float64) (gcjLat, gcjLng float64)
- type Coord
- func (c *Coord) BdToGcj02(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
- func (c *Coord) BdToWgs84(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
- func (c *Coord) Gcj02ToWgs84(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
- func (c *Coord) Gcj02toBd(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
- func (c *Coord) Wgs84ToBd(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
- func (c *Coord) Wgs84ToGcj02(in_lng, in_lat float64) (out_lng, out_lat float64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Distance ¶
Distance calculate the distance between point(latA, lngA) and point(latB, lngB), unit in meter.
func GCJtoWGS ¶
GCJtoWGS convert GCJ-02 coordinate(gcjLat, gcjLng) to WGS-84 coordinate(wgsLat, wgsLng). The output WGS-84 coordinate's accuracy is 1m to 2m. If you want more exactly result, use GCJtoWGSExact/gcj2wgs_exact.
func GCJtoWGSExact ¶
GCJtoWGSExact convert GCJ-02 coordinate(gcjLat, gcjLng) to WGS-84 coordinate(wgsLat, wgsLng). The output WGS-84 coordinate's accuracy is less than 0.5m, but much slower than GCJtoWGS/gcj2wgs.
Types ¶
Click to show internal directories.
Click to hide internal directories.