How to obtain dynamic google map url of a specific map (I have static map url)

社会主义新天地 提交于 2019-12-24 03:26:14

问题


I have the below static google map url. just want to know the equivalent for dynamic map.

Static Google Map URL

I am not sure if it is v2 or v3.


回答1:


Replace center by q and just swap the base URLs:

http://maps.googleapis.com/maps/api/staticmap?center=Brooklyn%20Bridge,New%20York,NY&zoom=14&size=512x512&maptype=roadmap%20&markers=color%3ablue|label%3aS|40.702147,-74.015794&markers=color%3agreen|label%3aG|40.711614,-74.012318%20&markers=color%3ared|color%3ared|label%3aC|40.718217,-73.998284&sensor=false

to:

http://maps.google.com/maps?q=Brooklyn%20Bridge,New%20York,NY&zoom=14&size=512x512&maptype=roadmap%20&markers=color%3ablue|label%3aS|40.702147,-74.015794&markers=color%3agreen|label%3aG|40.711614,-74.012318%20&markers=color%3ared|color%3ared|label%3aC|40.718217,-73.998284&sensor=false


来源:https://stackoverflow.com/questions/7102264/how-to-obtain-dynamic-google-map-url-of-a-specific-map-i-have-static-map-url

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