Styles for google map API disappear when zooming out reaches a specific level

511 Views Asked by At

I am using these properties to style my map, but the styles disappear when zooming out at a specific level. Am I missing anything? Thanks

styles: [
         {
          "featureType": "transit.line",
          "stylers": [
                      { "color": "#00FF00" },
                      { "weight": 4 },
                      { "visibility": "on" }
                     ]
         }
        ]
1

There are 1 best solutions below

0
geocodezip On

You are styling transit lines, those won't be visible on the map tiles once you zoom out past a certain level (no matter how you style them), then they won't appear.

If you want to make them visible all the time, you need to add them as a separate layer.

You could use the TransitLayer but that seems to have the same issue. Probably your only option is to get the data for the lines you want into a KmlLayer or a FusionTableLayer.