An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
First time I've come across this issue but most likely due to a lack of people using that CSP policy. Image templates use inline SVG strings to create custom icons for use with the HTML Markers and Symbol layers. There isn't an option to modify how that works. Note that HTML markers are more of a legacy item for showing points on the map and quickly can become a performance bottleneck and should be avoided (you can render a couple hundred at best before the whole app will become slow). There are a couple of scenarios where they do make sense to use but generally are not good option for displaying a bunch of points. (main scenarios for using them; when you need to be able to drag the point around the map, you want to use custom CSS/HTML to render a point).
Instead, use a symbol layer and data source. A symbol layer renders icons on a canvas rather than in the DOM and thus should not have any issues with inline code/styles. Additionally, this layer is designed for performance and capable of rendered 100K+ points on a map. Generally, with Azure Maps using data sources with one or more rendering layers (symbol, bubble, line, polygon) is the primary way for adding data to the map.
If you want to use the icon templates, they are supported by the symbol layer. Alternatively, you can use custom images. Here are some samples:
- https://samples.azuremaps.com/?sample=symbol-layer-with-built-in-icon-template
- https://samples.azuremaps.com/?sample=custom-symbol-image-icon
- https://samples.azuremaps.com/?sample=all-built-in-icon-templates-as-symbols
Here are some related docs:
- https://learn.microsoft.com/en-us/azure/azure-maps/map-add-pin
- https://learn.microsoft.com/en-us/azure/azure-maps/map-add-bubble-layer
- https://learn.microsoft.com/en-us/azure/azure-maps/create-data-source-web-sdk
- https://learn.microsoft.com/en-us/azure/azure-maps/data-driven-style-expressions-web-sdk