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

setMouseMode

Sets the map mode which determines the behaviour of the map based on mouse activity. Examples of this behaviour include zooming, panning and drawing on the map.

When this method is called it fires the mouse_mode_set event.

Parameters

Name Required Description
mode Yes The mouse mode that you want the map to be in.

Valid options are:
-Mapzania.MouseModes.Pan (default)
-Mapzania.MouseModes.DrawPoint
-Mapzania.MouseModes.DrawLine
-Mapzania.MouseModes.DrawPolygon

NOTE: The last three modes fire the drawing_done event when completed. See manual for more details.

Example

var map = new Mapzania.Map("map-div", "WORLD");
map.setMouseMode(Mapzania.MouseModes.DrawPoint);