Google Maps网址参数 [英] Google Maps url parameters
问题描述
在Google地图的网址请求中,必须定义域的中心: url = http://maps.googleapis.com/maps/api/staticmap? center = 10.027489,51.229248& size = 650x650& zoom = 14& sensor = false
即使当我使用缩放或尺寸玩时, t得到我想要的确切地图。有没有办法定义域的西南角和东北角?或者任何其他方式来更好地定义一个域?
是的,您可以使用 code>参数来指定矩形区域的两个对角,地图会自动调整中心和缩放以适应该区域。
请参阅隐式定位地图(有一个例子)
In url requests for Google Maps, the center of the domain has to be defined:
Even when I play with zoom or size, I don't get the exact map that I want. Is there a way to define the southwest and northeast corners of the domain ? Or any other way to better define a domain ?
Yes, you can use the visible
parameter to specify the 2 opposite corners of a rectangular region, and the map will automatically adjust center and zoom to fit that region.
See Implicit Positioning of the Map (there's an example there).
这篇关于Google Maps网址参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!