Google Maps url parameters

穿精又带淫゛_ 提交于 2019-12-12 00:51:52

问题


In url requests for Google Maps, the center of the domain has to be defined:

url = "http://maps.googleapis.com/maps/api/staticmap?center=10.027489,51.229248&size=650x650&zoom=14&sensor=false"

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 ?


回答1:


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).



来源:https://stackoverflow.com/questions/39352477/google-maps-url-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!