Visit azure.microsoft.com
Feedback
Provide Map Data Feedback
Add drawing toolbar to map
This sample shows how to use the Drawing Tools module and display the drawing toolbar on the map.
Interaction types
click - click/touch the map to add a position. Double click, press "c" key or click the toolbar to complete drawing.
freehand - press and hold the mouse/touch down. Mouse up, press "c" key to complete drawing.
hybrid (default) - combines click and freehand together and allows switching midway through a drawing.
Keyboard shortcuts:
"f" key - add a position where the mouse pointer is with increased percision.
"c" key - complete a shape.
"esc" key - cancel the draw.
To get the drawn data, use the
drawingManager.getSource()
function.