Firstly, I have written an example web app to illustrate drawing city boundaries on Google Maps with OpenStreetMap here:
This does much of the same thing as the web app I published last week, but with a lot stripped out to make it easier to understand. The GitHub page also has more of the technical detail laid out.
When I initially started this project I looked into various sources for this information. The Google Maps API v3 itself does not provide it, and many people recommend Twitter. This would have been great but it looks like Twitter changed the API for this particular call to require user authentication and limit use to only 15 calls per user per 15 minute window. So I ended up implementing this with OpenStreetMap using the Overpass API.
The main two issues with this:
- Creating OpenStreetMap queries to find the data which is labelled inconsistently.
- The data not existing for some cities at all, including major cities like Dallas and Los Angeles.