Google Maps: Hide country borders

旧巷老猫 提交于 2019-12-31 13:52:12

问题


I'm pretty sure geometry.stroke option allowed to hide country borders on the map.

     {
        featureType: "administrative.country",
        elementType: "geometry.stroke",
        stylers: [
            { visibility: "off" }
        ]
      }

But today I was wondering that's not working as expected, I still see the borders. Here is a code example: http://jsfiddle.net/xuvffdsn/

Any suggestions how to hide country borders?


回答1:


The fiddle you provided seems to work correctly for me (in that it hides the borders). I am able to turn country borders on and off. Here is your example updated so that the country borders are shown: http://jsfiddle.net/jkgudhze/. For me, this definitely adds the borders that were missing. I was able to show them by changing { stylers: [ { visibility: "off" } ] } in your code to { stylers: [ { visibility: "off" } ] }. Is there any chance that what you are seeing are state / region borders?



来源:https://stackoverflow.com/questions/25990252/google-maps-hide-country-borders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!