简体   繁体   中英

Google Maps: Hide country borders

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?

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM