我目前正在尝试自定义Google地图。Google地图自定义样式不起作用
我通过API(http://www.achimsagner.de/test/klysz/)设计了我的地图,但由于我使用了InfoBox,因此我的样式将无法加载。 (http://www.achimsagner.de/test/gmaps_test.html)
我只是找不到我的错误,也许有人可以帮助我。
我目前正在尝试自定义Google地图。Google地图自定义样式不起作用
我通过API(http://www.achimsagner.de/test/klysz/)设计了我的地图,但由于我使用了InfoBox,因此我的样式将无法加载。 (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');
谢谢!不知道我怎么弄不明白。 –