Justin,

We've mapped multiple polygons onto our website using data from a
JSON. Our polygons are wards (the administrative areas of our town )
rather than states, but the principle should be exactly the same.

Our JSON format :

http://selfserve.northampton.gov.uk/mycouncil/mycouncil.json

And the resulting webpage looks like this :

http://selfserve.northampton.gov.uk/mycouncil/

The section of code to pull this in is just an Ajax request to pull
the JSON file in then  :

              for (var currentWard = 0; currentWard <
jsonData.wards.length; currentWard++) {
                  wards[currentWard] = new google.maps.Polygon({
                        paths: jsonData.wards[currentWard].points,
                        strokeColor: "black",
                        strokeOpacity: 1,
                        strokeWeight: 2,
                        fillColor: initialColour,
                        fillOpacity: wardOpacity
                    });
             }


Cheers,

KW

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to