如何将静态Google Maps转换为动态Google Maps onclick静态地图? [英] How to convert Static Google Maps to Dynamic Google Maps onclick Static maps?

查看:101
本文介绍了如何将静态Google Maps转换为动态Google Maps onclick静态地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是静态的Google地图.

This is a static Google Maps. Click this link to view You can also view from HERE

http://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap
&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318
&markers=color:red%7Ccolor:red%7Clabel:C%7C40.718217,-73.998284&sensor=false

我想要的是,当我在网站上单击该图像时,它会自动从静态变为动态Google地图.

What I want is when I click on this image on my website, it automatically turns from static to dynamic Google Maps.

通过这种方式,地图将不会自动加载,并且加载时间将减少.

By this way, the map will not be loaded automatically and loading time will be reduced.

推荐答案

我很久以前就写了一个jQuery插件,将静态Google Map转换为动态Google Map.

I actually wrote a jQuery plugin quite a while back that converts a static Google Map to a dynamic one.

我不能保证每个参数都能正常工作(例如标记样式),但这可能会有所帮助.

I can't guarantee that every parameter works (like marker styling for example), but it might help.

http://andreaslagerkvist.com/jquery/static-to-dynamic-gm /

我实际上是在谷歌搜索某种官方方法来解决此问题时发现这个问题的.

I actually found this question while Googling for some official way to solve this problem.

这篇关于如何将静态Google Maps转换为动态Google Maps onclick静态地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆