Documentation ¶
Index ¶
- Constants
- func GetMetersPerPixel(zoom int) float64
- func GetSatelliteImage(point common.Point, zoom int, key string) image.Image
- func LonLatToMapbox(lonLat common.Point, zoom int, originTile [2]int) common.Point
- func LonLatToMapboxTile(lonLat common.Point, zoom int) [2]int
- func LonLatToMeters(lonLat common.Point) common.Point
- func LonLatToPixel(p common.Point, origin common.Point, zoom int) common.Point
- func MapboxToLonLat(p common.Point, zoom int, originTile [2]int) common.Point
- func MetersToLonLat(meters common.Point) common.Point
- func PixelToLonLat(p common.Point, origin common.Point, zoom int) common.Point
Constants ¶
View Source
const ORIGIN_SHIFT = 2 * math.Pi * 6378137 / 2.0
View Source
const URL = "https://restapi.amap.com/v3/staticmap?location=%f,%f&zoom=%d&size=576x576&maptype=satellite&key=%s"
const URL = "https://maps.googleapis.com/maps/api/staticmap?center=%f,%f&zoom=%d&size=576x576&maptype=satellite&key=%s"
Variables ¶
This section is empty.
Functions ¶
func GetMetersPerPixel ¶
func GetSatelliteImage ¶
Returns a 512x512 image centered at the point using the specified zoom level and API key
func LonLatToMapbox ¶
func LonLatToMeters ¶
convert latitude/longitude to Spherical Mercator EPSG:900913 source: http://gis.stackexchange.com/questions/46729/corner-coordinates-of-google-static-map-tile
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.