Documentation

Get geometry object

Geometry object holds geometry related informations such as, id, name, shape, type etc. Many of Micello SDK functions use geometry object as a parameter. This demo will show you have to get the geometry object from the geometry id.

Map related data is stored in MapData object. The code below shows how to get the MapData object.

mapDataObject = mapControl.getMapData();

Now mapDataObject has a geometry mapping object, geomMap. This object holds the list of all the geometries available on current drawing with geometry id as key and geometry object as value. Below line of code shows how to get the geometry object from geometry id.

var geomObj = mapDataObject.geomMap[geometry_id].g;

Change the geometry id in the demo and hit "Get Geometry Object" button and you will see the geometry object as string in an alert box.