googlemaps

package
v0.0.0-...-894703b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 GetMetersPerPixel(zoom int) float64

func GetSatelliteImage

func GetSatelliteImage(point common.Point, zoom int, key string) image.Image

Returns a 512x512 image centered at the point using the specified zoom level and API key

func LonLatToMapbox

func LonLatToMapbox(lonLat common.Point, zoom int, originTile [2]int) common.Point

func LonLatToMapboxTile

func LonLatToMapboxTile(lonLat common.Point, zoom int) [2]int

func LonLatToMeters

func LonLatToMeters(lonLat common.Point) common.Point

convert latitude/longitude to Spherical Mercator EPSG:900913 source: http://gis.stackexchange.com/questions/46729/corner-coordinates-of-google-static-map-tile

func LonLatToPixel

func LonLatToPixel(p common.Point, origin common.Point, zoom int) common.Point

func MapboxToLonLat

func MapboxToLonLat(p common.Point, zoom int, originTile [2]int) common.Point

func MetersToLonLat

func MetersToLonLat(meters common.Point) common.Point

func PixelToLonLat

func PixelToLonLat(p common.Point, origin common.Point, zoom int) common.Point

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL