Azure maps, drawing toolbar - add a custom button

Dev 216 Reputation points

Is it possible to add a custom button to the drawingToolbar, something like

            const buttons = ["draw-polygon", "draw-rectangle", "draw-circle", "edit-geometry", "erase-geometry", "my-custom-button"];
                buttons: buttons,
                position: "top-right",
                style: "light"

And then set the icon & onClick event?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
339 questions
No comments
{count} votes

Accepted answer
  1. rbrundritt 7,011 Reputation points Microsoft Employee

    I swear I responded to this yesterday. I must have closed my browser before pressing send.

    In any case, there is no built in support for adding custom buttons directly into the toolbar. However you can create a custom button and either float if above the map next to the toolbar (position absolute...), or use the custom control framework for the map.

    Here is a simple example that adds buttons above the map:

    There are many examples of custom controls for Azure Maps here:

    No comments

0 additional answers

Sort by: Most helpful