Skip to content

Commit 30389bb

Browse files
committed
Updated article (api-version=2024-04-01) and added 3 new examples.
1 parent a1773f7 commit 30389bb

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

articles/azure-maps/how-to-render-custom-data.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Render custom data on a raster map in Microsoft Azure Maps
33
description: Learn how to add pushpins, labels, and geometric shapes to a raster map. See how to use the static image service in Azure Maps for this purpose.
44
author: eriklindeman
55
ms.author: eriklind
6-
ms.date: 10/28/2021
6+
ms.date: 06/19/2024
77
ms.topic: how-to
88
ms.service: azure-maps
99
services: azure-maps
@@ -12,7 +12,7 @@ ms.custom: mvc
1212

1313
# Render custom data on a raster map
1414

15-
This article describes how to use the [Get Map Static Image] command with image composition functionality. Image composition functionality supports the retrieval of static raster tiles that contain custom data.
15+
This article describes how to use the [Get Map Static Image] command with image composition functionality. Image composition functionality supports the retrieval of static raster tiles that contain custom data and different styles.
1616

1717
The following are examples of custom data:
1818

@@ -28,21 +28,19 @@ The following are examples of custom data:
2828
- [Azure Maps account]
2929
- [Subscription key]
3030

31-
This article uses the [Bruno] application, but you may use a different API development environment.
32-
33-
>[!IMPORTANT]
31+
> [!IMPORTANT]
3432
> In the URL examples, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
3533
36-
## Render pushpins with labels and a custom image
34+
This article uses the [Bruno] application, but you may use a different API development environment.
3735

3836
> [!NOTE]
39-
> The procedure in this section requires an Azure Maps account in the Gen2 pricing tier.
37+
> The examples in this article require an Azure Maps account in the Gen2 pricing tier.
4038
>
4139
> **Azure Maps Gen1 pricing tier retirement**
4240
>
4341
> Gen1 pricing tier is now deprecated and will be retired on 9/15/26. Gen2 pricing tier replaces Gen1 (both S0 and S1) pricing tier. If your Azure Maps account has Gen1 pricing tier selected, you can switch to Gen2 pricing before it’s retired, otherwise it will automatically be updated. For more information, see [Manage the pricing tier of your Azure Maps account].
4442
45-
### Get static image with custom pins and labels
43+
## Get static image with custom pins and labels
4644

4745
To get a static image with custom pins and labels:
4846

@@ -70,9 +68,6 @@ The following image is returned:
7068
7169
## Render a polygon with color and opacity
7270
73-
> [!NOTE]
74-
> The procedure in this section requires an Azure Maps account Gen1 (S1) or Gen2 pricing tier.
75-
7671
You can modify the appearance of a polygon by using style modifiers with the [path] parameter.
7772
7873
To render a polygon with color and opacity:
@@ -142,7 +137,7 @@ The following image is returned:
142137
143138
Similarly, you can change, add, and remove other style modifiers.
144139
145-
### Add a traffic layer
140+
## Add a traffic layer
146141
147142
To get a static image with a traffic layer rendered on a roads basemap, use the `trafficLayer` parameter. The following example shows a map with a traffic layer as well as a pin with a label:
148143
@@ -168,7 +163,7 @@ The following image is returned:
168163
169164
:::image type="content" source="./media/how-to-render-custom-data/rendering-traffic-layer-information.png" alt-text="A screenshot of a map showing the traffic layer, as well as a custom pushpin with the label Westminster Bridge.":::
170165
171-
### Create a map using the dark gray style
166+
## Create a map using the dark gray style
172167
173168
To get a static image with the dark gray style appplied, set the `TilesetId` parameter to `microsoft.base.darkgrey`:
174169
@@ -196,8 +191,7 @@ The following image is returned:
196191
197192
For more information the different styles available using the TilesetId parameter, see [TilesetId] in the *Render - Get Map Tileset* REST API documentation.
198193
199-
200-
### Create a map using the imagery style
194+
## Create a map using the imagery style
201195
202196
To get a static image with the imagery style appplied, set the `TilesetId` parameter to `microsoft.imagery`:
203197
@@ -212,7 +206,7 @@ To get a static image with the imagery style appplied, set the `TilesetId` param
212206
1. Enter the following URL:
213207
214208
```HTTP
215-
https://atlas.microsoft.com/map/static?subscription-key={Your-Azure-Maps-Subscription-key}&zoom=16&tilesetId=microsoft.base.darkgrey&api-version=2024-04-01&language=en-us&center=-95.360200,29.753452&pins=custom%7Cla15+50%7Cls12%7Clc003b61%7C%7C%27Westminster Bridge%27-0.122427+51.500867%7C%7Chttps%3A%2F%2Fsamples.azuremaps.com%2Fimages%2Ficons%2Fylw-pushpin.png&height=700&Width=700
209+
https://atlas.microsoft.com/map/static?subscription-key={Your-Azure-Maps-Subscription-key}&zoom=16&tilesetId=microsoft.imagery&api-version=2024-04-01&language=en-us&center=-43.176141,-22.965458&height=700&Width=700
216210
```
217211
218212
1. Select **Create**.
@@ -221,24 +215,21 @@ To get a static image with the imagery style appplied, set the `TilesetId` param
221215
222216
The following image is returned:
223217
224-
:::image type="content" source="./media/how-to-render-custom-data/darkgray.png" alt-text="A screenshot of a map showing the dark gray style created by setting the tileset ID parameter to microsoft.base.darkgrey.":::
218+
:::image type="content" source="./media/how-to-render-custom-data/imagery.png" alt-text="A screenshot of a map showing the dark gray style created by setting the tileset ID parameter to microsoft.base.darkgrey.":::
225219
226220
For more information the different styles available using the TilesetId parameter, see [TilesetId] in the *Render - Get Map Tileset* REST API documentation.
227221
228-
229222
## Next steps
230223
231224
> [!div class="nextstepaction"]
232225
> [Render - Get Map Static Image]
233226
234227
[Azure Maps account]: quick-demo-map-app.md#create-an-azure-maps-account
235228
[Bruno]: https://www.usebruno.com/
236-
[Subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
237-
238229
[Get Map Static Image]: /rest/api/maps/render/get-map-static-image
239230
[Manage the pricing tier of your Azure Maps account]: how-to-manage-pricing-tier.md
240231
[path]: /rest/api/maps/render/get-map-static-image#uri-parameters
241-
[pins]: /rest/api/maps/render/get-map-static-image#uri-parameters
242-
[Render]: /rest/api/maps/render/get-map-static-image
243232
[Render - Get Map Static Image]: /rest/api/maps/render/get-map-static-image
233+
[Render]: /rest/api/maps/render/get-map-static-image
234+
[Subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
244235
[TilesetId]: /rest/api/maps/render/get-map-tileset#tilesetid

0 commit comments

Comments
 (0)