Geographical boundaries of states/provinces -> Google Maps Polygon

前端 未结 4 1110
灰色年华
灰色年华 2020-11-28 20:23

I\'m building a web application that is going to dynamically highlight certain U.S. states and Canadian provinces on a Google Map, based on buttons and click events.

4条回答
  •  北海茫月
    2020-11-28 20:41

    Using the XML provided, I created a JSON file with a dictionary that includes the 50 states, Washington D.C. and a rough outline of the Canadian provinces to address SaltyNuts' comment as well as Mike Williams note of not having anything for Canada json.

    This handy online tool from BirdTheme was what I used to draw the polygons for the provinces for anyone else who needs different levels of detail or to create their own set of coordinates.

提交回复
热议问题