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

convertToCentroids

Creates an filter that converts all geometry to a point that represents its centroid. See this for a working example.

Parameters

No parameters.

Example

map.usingLayer("COUNTRIES")
    .convertToCentroids()
    .style({ fillColor: "#0000FF"})
    .update();