JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

getCentroid

Calculates the centroid of a GeoJSON geometry object or BoundingBox as a GeoJSON Point.

Parameters

Name Required Description
geometry Yes Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object or a BoundingBox array.