[GIS] Does Google Maps API or OSM provide location/place boundaries

apiboundariesgoogle mapsleafletopenstreetmap

I've been digging around today in Google Maps and Leaflet API's to find if there is an easy way to get these boundaries instead of needing our users to manually outline these things (like drawing polygons on the map)?

Best Answer

You can export data for several boundaries from the main OSM database. Administrative boundaries are complete in OSM for admin_level=2 that are for whole countries, and they are very up-to-date.

The deper you go in admin_level there are countries that have 100% coverage for each place region, other countries still have some gaps. When using data from OSM, pay attention to ist free licence ODbL.

Howto do that, search for "[openstreetmap] export boundaries" on this site, or search for "export boundaries" on http://help.osm.org

There you will find services how to get boundaries in different file formats. and you can display them via any framework like leafletjs, openlayers or any other.

Related Question