google-maps - 谷歌地图 API V3 "Overview"选项

标签 google-maps

Google Maps API V3 尚不支持 V2 GOverviewMapControl 选项。我在 http://dl.google.com/io/2009/pres/Th_1045_Maps_API_Mobile.pdf 遇到了一段代码,silde 19,它给出了显示较小 map 的代码,但不是您通常在此处看到的可拖动的半透明蓝色框。这是可能的,但不幸的是,代码被“省略”了。任何人有任何想法如何生成这个?谢谢

最佳答案

这是 Maps v3 中开箱即用的工作方式:

function initialize() {
  var mapOptions = {
    zoom: 8,
    center: new google.maps.LatLng(-34.397, 150.644),
    mapTypeId: google.maps.MapTypeId.ROADMAP
    overviewMapControl: true,
    overviewMapControlOptions: {opened: true}
  }
  var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
}

请注意 mapOptions 对象的最后两个属性。他们做到了。

关于google-maps - 谷歌地图 API V3 "Overview"选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1651314/

相关文章:

android - 谷歌地图有商业许可证吗?

javascript - 使用 Google Autocomplete API 根据位置名称获取经纬度

r - 将经/纬度转换为邮政编码/社区名称

ios - 尝试安装 Pod 但出现错误

javascript - 如何获取谷歌地图上放置的标记的 GPS 坐标?

java - 屏幕上的触摸点 Google map SupportMapFragment

html - 限制网页结尾

javascript - 如何在Google Maps API中组织数千个数据点?

java - 如何解析来自 android 中间件的 Directions API 响应?

Android map 实用程序 : images from URL