Home > Mobile >  Get all the latitude and longitude set of an area via google maps API
Get all the latitude and longitude set of an area via google maps API

Time:02-19

enter image description here

When I search for a place on google maps, an area precisely, is highlighted on the map, I would like to get the whole set of latitudes and longitudes that make up this area, how can I get them via API? or is there another way or service?

CodePudding user response:

You can use openstreetmap.com:

  1. Search for the area on openstreetmap
  2. Copy-paste the relation number in http://polygons.openstreetmap.fr/index.py
  3. Select the correct poly from the list
  4. Save as .txt file: each line in the file contains the long and lat coordinates of a geopoint: all geopoints together form the border of the shape (aka the area)
  • Related