1

I have a JSON file with states of USA. Is it possible to hide whole map (including countries, oceans, etc.), except of one state or except of some quantity of states using only pure javascript or jquery? For example, Wyoming has these coordinates (Lat, Lng):

{
    "name": "Wyoming",
    "id": "WY",
    "coords": [
        [41.0037, -104.0556],
        [44.9949, -104.0584],
        [44.9998, -111.0539],
        [40.9986, -111.0457],
        [41.0006, -104.0556]
    ]
}

I would like to implement it with fillColor: #FFF and fillOpacity: 1. Should I have coordinates of whole world (rofl) to except e.g. Wyoming from this filling options?

captainsac
  • 2,484
  • 3
  • 27
  • 48
max
  • 612
  • 7
  • 26
  • possible duplicate of [Country specific zoom level in Google Maps API](http://stackoverflow.com/questions/28126462/country-specific-zoom-level-in-google-maps-api) – geocodezip Jun 02 '15 at 12:54
  • possible duplicate of [Polygon of world map with a hole (google maps)](http://stackoverflow.com/questions/27399025/polygon-of-world-map-with-a-hole-google-maps) – geocodezip Jun 02 '15 at 12:56
  • possible duplicate of [showing specific state of a country on gmap highlighted](http://stackoverflow.com/questions/14022368/showing-specific-state-of-a-country-on-gmap-highlighted) – geocodezip Jun 02 '15 at 12:59

1 Answers1

0

These links should help you.

Display only a specific country (region) in google maps How to display only one country or a specific area in Google maps using the api?

(question is duplicate Imo, but can't mark it as such)

Community
  • 1
  • 1