map city/zipcode polygons using google maps

前端 未结 4 1102
日久生厌
日久生厌 2020-12-30 13:41

I am looking for a javascript library that supports the ability to pass a zipcode or city as a parameter, and get a list of x,y coordinates to draw a polygon using google ma

4条回答
  •  庸人自扰
    2020-12-30 14:32

    You can get polygon coordenates in json for using with googlemaps using openstreetmap. Go to http://nominatim.openstreetmap.org/ search a place like "Partido de Ituzaingó"

    Steps:

    • Click on "details"
    • Look for the OSM ID and copy it (control+c), example: 2018776
    • Go to http://polygons.openstreetmap.fr/index.py
    • Paste the ID in
    • Download the polygon

提交回复
热议问题