Is it possible to make Azure map be the base map in Leaflet

632 Views Asked by At

I want to create a map that uses Azure maps as the base map layer in Leaflet.

From what I understand, Leaflet will be the canvas/control and Azure maps will be the layer added by Leaflet. https://learn.microsoft.com/en-us/samples/azure-samples/azure-maps-leaflet/azure-maps-leaflet-plugin/

1

There are 1 best solutions below

0
rbrundritt On

Azure Maps base map imagery can be used within Leaflet.

Here is a helper library that makes this fairly easy: https://github.com/Azure-Samples/azure-maps-leaflet

The plugin helps makes it easier to integrate with Leaflet, especially if you use the Azure Active Directory authentication option of Azure Maps. However, you can easily just add the Azure Maps using a TileLayer pointing to the Azure Maps Imagery Render service: https://learn.microsoft.com/en-us/rest/api/maps/render-v2/get-map-tile