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

createPolygon

Creates a GeoJSON Polygon geometry object.

Parameters

Name Required Description
coordinates Yes The GeoJSON coordinates of the Polygon or a bounding box coordinate array.

Example

var gjson = Mapzania.GeoJson.createPolygon([[[20.33, 30.64],[16.23, 21.59],[20.33, 30.64]],[[12.43, 41.22],[19.87, 32.43],[12.43, 41.22]]]);
var gjson = Mapzania.GeoJson.createPolygon([12.1, 3.4, 14.3, 4.2]);