如何使用Google Maps API v3从地图中获取MapOptions对象 [英] How to get the MapOptions object from a map with Google Maps API v3

查看:184
本文介绍了如何使用Google Maps API v3从地图中获取MapOptions对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google Maps api v2中,您可以直接从地图对象获取地图类型,缩放等参数。在版本3中,您有setOptions方法来设置一些参数,但没有getOptions()或选项来检索它们。

解决方案

您可以通过地图 class:


In Google Maps api v2 you could get parameters such as the map type, zoom etc directly from the map object. In version 3 you have the setOptions method to set some parameters, but there is no getOptions() or options to retrieve them.

解决方案

You can access those properties via methods on the Map class:

这篇关于如何使用Google Maps API v3从地图中获取MapOptions对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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