4

I'm looking to reposition a JavaScript map based on GeoJSON data. Can I calculate the center point of a Polygon from its array of coordinates? e.g. with:

{
    "data": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    -9.31640625,
                    43.83452678223682
                ],
                /* etc */
            ]
        ]
    }
}
adm
  • 285
  • 1
  • 3
  • 9
  • What exactly is center of polygon in your case? – c-smile Mar 05 '13 at 23:47
  • Have a look on this: https://gis.stackexchange.com/questions/248076/getting-the-center-of-a-feature-collection-in-geojson?newreg=250852bb9b474889b0357a18ad240dac – gazdagergo Jan 15 '21 at 18:29

0 Answers0