Ross Rawlins
Ross Rawlins

Reputation: 667

Google MAP region co ordinates and polygons

I am trying to create an Angular application that relies heavily on google maps. I would like to highlight areas on the map by continent->country->state->suburb and depending on the values of supplied will determine what the highlighted areas coluor would be.

I have read that with google map polygons you need to set the boundary co ordinates so that the polygon will display/cover in he correct places. The first part of this question is if this is true where would I begin to get all the co ordinates for these boundaries? is it already built into google and I missed it?

Second part of the question is am I approaching this problem the right way is there a better solution to this. I have inserted an example image below of what I am looking to recreate dynamically.

Any guidance on this will be appreciated.example Image

Upvotes: -1

Views: 200

Answers (1)

Oskari3000
Oskari3000

Reputation: 131

You need to have all the coordinates of the polygon, and I'm afraid you'll have to retrieve them by yourself somehow. Although it might be possible that somebody else has already made a list of coordinates that represent a certain country/state/etc but still you would need to find them first (and use them with the Google Maps API).

Maybe you could make a small tool with Google Maps API, that will let you click the polygon coordinates to the map and then give you back the list of the coordinates?

Upvotes: 1

Related Questions