我目前正在尝试自定义 Google 地图。
我通过 API ( http://www.achimsagner.de/test/klysz/ ) 设置了我的地图样式,但由于我使用了信息框,我的样式不会加载。( http://www.achimsagner.de/test/gmaps_test.html )
我只是找不到我的错误,也许有人可以帮助我。
我目前正在尝试自定义 Google 地图。
我通过 API ( http://www.achimsagner.de/test/klysz/ ) 设置了我的地图样式,但由于我使用了信息框,我的样式不会加载。( http://www.achimsagner.de/test/gmaps_test.html )
我只是找不到我的错误,也许有人可以帮助我。
将样式添加到您的 myMapOptions
var myMapOptions = {
zoom: 16,
center: secheltLoc,
styles : styles,
disableDefaultUI: true,
scrollwheel: false
}
应用该样式的页面包含以下页面中不存在的行:
//Associate the styled map with the MapTypeId and set it to display.
theMap.mapTypes.set('map_style', styledMap);
theMap.setMapTypeId('map_style');