views:

1127

answers:

2

Hi all,

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.

Plan A) Polygons

My primary idea for this was to draw Polygons. For this I need lists of coordinates (latitude + longitude) of all state and province outlines (clockwise or counter-clockwise). On government websites I found all sorts of different formats (i.e. E00), but I have trouble converting these formats into a simple list of coordinates, that I could use to create markers or a polygon on a map. Do you have any tips where to get these coordinates?

Plan B) Overlays

AFAIK, if you use overlays on Google Maps, they become pixelated as you zoom in further (or can you overlay SVGs?) In my case I would need 50 + 11 overlays in the worst-case (all states and all provinces). Is that still possible with Google Maps or will it get unsuably slow?

I'm a bit startled that there isn't a straight-forward way to highlight a state or province, as I would think this is a very common tasks for people using an API for maps.

Thanks in advance

+2  A: 

I've got XML for US state polygons here. I use them like this.

I deliberately kept the detail fairly light to reduce the loading time and end up with a map that's reasonably responsive in slow browsers.

I don't have anything for Canada.

Mike Williams
Thanks a bunch! Your data worked without any problems. Like the level of detail too. You rock!
motto
@Mike Williams: Why do the boundaries of adjacent states fit so badly together? I understand that there is some limit in resolution, but there is no reason for gaps and overlaps (visible in higher zoom levels) between adjacent states.
Curd
+1  A: 

anyone know where i can get non-us polygons???