在Google地图开发中如何获取现有地图对象 [英] In Google maps development how to get the Existing map object
本文介绍了在Google地图开发中如何获取现有地图对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Google Maps JavaScript API V3开发中,如何获取现有的地图对象?谢谢!
In google maps javascript API V3 development,how to get the existing map object?Thank you!
推荐答案
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
表示地图的JavaScript类是Map class
.此类的对象在页面上定义单个地图. (您可以创建多个此类的实例-每个对象将在页面上定义一个单独的映射.)我们使用 JavaScript new运算符 创建一个此类的新实例.
The JavaScript class that represents a map is the Map class
. Objects of this class define a single map on a page. (You may create more than one instance of this class - each object will define a separate map on the page.) We create a new instance of this class using the JavaScript new operator.
这篇关于在Google地图开发中如何获取现有地图对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文