eeejay
eeejay

Reputation: 5854

show boundaries only in google maps

Using the Google Maps API V3, is it possible to show only state boundaries and nothing else?

I've tried using google.maps.MapTypeStyleFeatureType and turning off all the features, but I am still getting way more than I want.

Even with mapType=Road you still see topographic information.

How can I get just a simple boundary map with nothing else showing?

Upvotes: 0

Views: 661

Answers (1)

Jeremy Hamm
Jeremy Hamm

Reputation: 499

Trying using this style object, hopefully it is what you are looking for. There are many sites which allow you to customize your style using a GUI. Try this one

  [
    {
      "featureType": "water",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "landscape",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "poi",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "transit",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "road",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "administrative",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "administrative.country",
      "stylers": [{ "visibility": "on" }]
  },{
      "featureType": "administrative.country",
      "elementType": "labels.text",
      "stylers": [{ "visibility": "off" }]
  },{
      "featureType": "administrative.province",
      "stylers": [{ "visibility": "on" }]
  },{
      "featureType": "administrative.province",
      "elementType": "labels.text",
      "stylers": [{ "visibility": "off" }]
  }
]

Upvotes: 1

Related Questions