Search code examples
c#.netazurebing-mapsazure-maps

Azure Maps - Render - Get Map Image - How to use pin image instead of marker image for the pin in default mode


I am using default pins for my maps, and i get marker image on maps when i use the URL given below. i want to use predined pin images for my icon. i don't want to use custom image or don't want to customize the pin on my own.

how can i use icon images already available on this image: How can i use these available pin icons with the URL given below

URL for Azure Maps: https://atlas.microsoft.com/map/static/png?api-version=1.0&style=main&layer=basic&zoom=14&height=700&Width=700&center=-122.13230609893799,47.64599069048016&path=lcFF0000|lw2|la0.60|ra1000||-122.13230609893799 47.64599069048016&pins=default|la15+50|al0.66|lc003C62|co002D62||'Microsoft Corporate Headquarters'-122.14131832122801 47.64690503939462|'Microsoft Visitor Center'-122.136828 47.642224|'Microsoft Conference Center'-122.12552547454833 47.642940335653996|'Microsoft The Commons'-122.13687658309935 47.64452336193245&subscription-key={subscription-key}


Solution

  • The screenshot you pointed to is of the Web SDK for Azure Maps. Those marker images are actually a template, just like REST service, but with predefined colors. These predefined colored markers are not provided in the REST service.

    The Web SDK had predefined markers with colors before templating of markers was supported. Now in the Web SDK the preference is to use icon templates like this which give you the shape but allows you to customize the size, and primary and secondary color. https://azuremapscodesamples.azurewebsites.net/index.html?search=template&sample=All%20built-in%20icon%20templates%20as%20symbols