Azure Maps-渲染-获取地图图像-如何在默认模式下为图钉使用图钉图像而不是标记图像

问题描述

我正在为地图使用认图钉,并且当我使用下面给出的 URL 时,我会在地图上获得标记图像。我想使用预定的图钉图像作为我的图标。我不想使用自定义图片或不想自己自定义图钉。

我如何使用该图像上已有的图标图像: How can i use these available pin icons with the URL given below

Azure Maps的URL 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}

解决方法

您指向的屏幕截图是用于Azure Maps的Web SDK。这些标记图像实际上是模板,就像REST服务一样,但是具有预定义的颜色。这些预定义的彩色标记未在REST服务中提供。

在支持标记模板之前,Web SDK已使用颜色预定义了标记。现在,在Web SDK中,首选项是使用这样的图标模板,这些模板可以为您提供形状,但允许您自定义大小以及主要和辅助颜色。 https://azuremapscodesamples.azurewebsites.net/index.html?search=template&sample=All%20built-in%20icon%20templates%20as%20symbols