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

drawing_done

Fired when the user completes a drawing action on the map.


Event Result

GeoJSON Geometry based on the current MouseMode as per the table below:

MouseMode Result Type
DrawPoint GeoJSON Point
DrawLine GeoJSON LineString
DrawPolygon GeoJSON Polygon

Example

var map = new Mapzania.Map("map-div", "LONDON", function () {

    map.on("drawing_done", function (data) {
        console.log(data);
    });

    map.setMouseMode(Mapzania.MouseModes.DrawLine);
});