Reputation: 209
I've recently discovered geolocation, it is a wonderful and fun little feature.
I've figured out how to show somebody's location on a map with a little pin and how to fetch the different parts of their address from the delivered data.
One thing I want to do with all this though is given somebodys location to then highlight their city.
I know that now with google maps if you type in UK postcodes or Japanese cities this can be done, however it gives a very difficult to see outline around the location. It doesn't fully shade it.
My ultimate goal is to shade somebodys city a different colour depending on certain variables, the actual google maps content beyond the basic 'this is where the city is' is unimportant (working out these variables and colours is of course a different area and not the purpose of this question).
So...sorry for my poor English here. But I woder. Is there anyway, given a certain input which on default google maps would give the outlined administrative division, will shade the city a given colour?
Bonus points if you can do more than one city at once (ultimate goal- show their surrounding cities as well as their current city)
Upvotes: 1
Views: 1124
Reputation: 424
I'm doubt you can do it for google map as there seem no way to retrieve google map boundary data. The alternative that I can think of is the use of OpenStreetMap with Kartograph library. This possibly could give you a solution, but you need to manually generate the border out from the OpenStreetMap and color it using the Kartograph library.
Upvotes: 1