如何获取特定地图的动态谷歌地图网址(我有静态地图网址)

时间:2011-08-18 04:11:02

标签: google-maps google-maps-api-3 google-maps-api-2

我有以下静态谷歌地图网址。只是想知道动态地图的等价物。

Static Google Map URL

我不确定它是v2还是v3。

1 个答案:

答案 0 :(得分:3)

center替换为q,然后只需交换基本网址:

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

为:

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