如何将Google地图变成图像?而不能用鼠标移动? [英] How do I turn my Google Maps into just an image? And not movable using the mouse?
本文介绍了如何将Google地图变成图像?而不能用鼠标移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的javascript代码是这样的:
My javascript code is this:
var myOptions = {
scrollwheel:false,
zoom: 15,
center: the_lat_long,
mapTypeControl:false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
推荐答案
如果您只想渲染静态图像,我只想使用 Google Maps Static API 。这只会产生一个常规的< img>
标记,其中一个名为url的api为 src =
。我更喜欢这个选项,因为没有理由使用javascript api的开销,如果一个简单的< img>
标签为你完成这项工作。
If you are just wanting to render a static image, I would just use the Google Maps Static API. This would just result in a regular <img>
tag with a api called url as the src=
. I would prefer this option because there is no reason to use the overhead of the javascript api if a simple <img>
tag does the job for you.
这篇关于如何将Google地图变成图像?而不能用鼠标移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文