Skip to content

Commit c2dcbe2

Browse files
Merge pull request #249833 from stevemunk/how-to-render-custom-data
Removing references to the depreciated data service in the "How to render custom data" article.
2 parents 5d16e6a + c375464 commit c2dcbe2

File tree

3 files changed

+7
-166
lines changed

3 files changed

+7
-166
lines changed

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

Lines changed: 5 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ The following are examples of custom data:
3030

3131
This article uses the [Postman] application, but you may use a different API development environment.
3232

33-
Use the Azure Maps [Data service] to store and render overlays.
33+
>[!IMPORTANT]
34+
> In the URL examples, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
3435
3536
## Render pushpins with labels and a custom image
3637

@@ -54,7 +55,7 @@ To get a static image with custom pins and labels:
5455

5556
4. Select the **GET** HTTP method.
5657

57-
5. Enter the following URL (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key):
58+
5. Enter the following URL:
5859

5960
```HTTP
6061
https://atlas.microsoft.com/map/static/png?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&layer=basic&style=main&zoom=12&center=-73.98,%2040.77&pins=custom%7Cla15+50%7Cls12%7Clc003b61%7C%7C%27CentralPark%27-73.9657974+40.781971%7C%7Chttps%3A%2F%2Fraw.githubusercontent.com%2FAzure-Samples%2FAzureMapsCodeSamples%2Fmaster%2FAzureMapsCodeSamples%2FCommon%2Fimages%2Ficons%2Fylw-pushpin.png
@@ -66,156 +67,6 @@ To get a static image with custom pins and labels:
6667
6768
:::image type="content" source="./media/how-to-render-custom-data/render-pins.png" alt-text="A custom pushpin with a label.":::
6869
69-
## Upload pins and path data
70-
71-
> [!NOTE]
72-
> The procedure in this section requires an Azure Maps account Gen1 (S1) or Gen2 pricing tier.
73-
74-
In this section, you upload path and pin data to Azure Map data storage.
75-
76-
To upload pins and path data:
77-
78-
1. In the Postman app, select **New**.
79-
80-
2. In the **Create New** window, select **HTTP Request**.
81-
82-
3. Enter a **Request name** for the request, such as *POST Path and Pin Data*.
83-
84-
4. Select the **POST** HTTP method.
85-
86-
5. Enter the following URL (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key):
87-
88-
```HTTP
89-
https://us.atlas.microsoft.com/mapData?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=2.0&dataFormat=geojson
90-
```
91-
92-
6. Select the **Body** tab.
93-
94-
7. In the dropdown lists, select **raw** and **JSON**.
95-
96-
8. Copy the following JSON data as data to be uploaded, and then paste them in the **Body** window:
97-
98-
```JSON
99-
{
100-
"type": "FeatureCollection",
101-
"features": [
102-
{
103-
"type": "Feature",
104-
"properties": {},
105-
"geometry": {
106-
"type": "Polygon",
107-
"coordinates": [
108-
[
109-
[
110-
-73.98235,
111-
40.76799
112-
],
113-
[
114-
-73.95785,
115-
40.80044
116-
],
117-
[
118-
-73.94928,
119-
40.7968
120-
],
121-
[
122-
-73.97317,
123-
40.76437
124-
],
125-
[
126-
-73.98235,
127-
40.76799
128-
]
129-
]
130-
]
131-
}
132-
},
133-
{
134-
"type": "Feature",
135-
"properties": {},
136-
"geometry": {
137-
"type": "LineString",
138-
"coordinates": [
139-
[
140-
-73.97624731063843,
141-
40.76560773817073
142-
],
143-
[
144-
-73.97914409637451,
145-
40.766826609362575
146-
],
147-
[
148-
-73.98513078689575,
149-
40.7585866048861
150-
]
151-
]
152-
}
153-
}
154-
]
155-
}
156-
```
157-
158-
9. Select **Send**.
159-
160-
10. In the response window, select the **Headers** tab.
161-
162-
11. Copy the value of the **Operation-Location** key, which is the `status URL`. We'll use the `status URL` to check the status of the upload request in the next section. The `status URL` has the following format:
163-
164-
```HTTP
165-
https://us.atlas.microsoft.com/mapData/operations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?api-version=2.0
166-
```
167-
168-
>[!TIP]
169-
>To obtain your own path and pin location information, use [Data Upload].
170-
171-
### Check pins and path data upload status
172-
173-
To check the status of the data upload and retrieve its unique ID (`udid`):
174-
175-
1. In the Postman app, select **New**.
176-
177-
2. In the **Create New** window, select **HTTP Request**.
178-
179-
3. Enter a **Request name** for the request, such as *GET Data Upload Status*.
180-
181-
4. Select the **GET** HTTP method.
182-
183-
5. Enter the `status URL` you copied in [Upload pins and path data](#upload-pins-and-path-data). The request should look like the following URL (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key):
184-
185-
```HTTP
186-
https://us.atlas.microsoft.com/mapData/operations/{statusUrl}?api-version=2.0&subscription-key={Your-Azure-Maps-Subscription-key}
187-
```
188-
189-
6. Select **Send**.
190-
191-
7. In the response window, select the **Headers** tab.
192-
193-
8. Copy the value of the **Resource-Location** key, which is the `resource location URL`. The `resource location URL` contains the unique identifier (`udid`) of the drawing package resource.
194-
195-
:::image type="content" source="./media/how-to-render-custom-data/resource-location-url.png" alt-text="Copy the resource location URL.":::
196-
197-
### Render uploaded features on the map
198-
199-
To render the uploaded pins and path data on the map:
200-
201-
1. In the Postman app, select **New**.
202-
203-
2. In the **Create New** window, select **HTTP Request**.
204-
205-
3. Enter a **Request name** for the request, such as *GET Data Upload Status*.
206-
207-
4. Select the **GET** HTTP method.
208-
209-
5. Enter the following URL to the [Render service] (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key and `udid` with the `udid` of the uploaded data):
210-
211-
```HTTP
212-
https://atlas.microsoft.com/map/static/png?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&layer=basic&style=main&zoom=12&center=-73.96682739257812%2C40.78119135317995&pins=default|la-35+50|ls12|lc003C62|co9B2F15||'Times Square'-73.98516297340393 40.758781646381024|'Central Park'-73.96682739257812 40.78119135317995&path=lc0000FF|fc0000FF|lw3|la0.80|fa0.30||udid-{udId}
213-
```
214-
215-
6. The service returns the following image:
216-
217-
:::image type="content" source="./media/how-to-render-custom-data/uploaded-path.png" alt-text="Render uploaded data in static map image.":::
218-
21970
## Render a polygon with color and opacity
22071
22172
> [!NOTE]
@@ -233,7 +84,7 @@ To render a polygon with color and opacity:
23384
23485
4. Select the **GET** HTTP method.
23586
236-
5. Enter the following URL to the [Render service] (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key):
87+
5. Enter the following URL to the [Render service]:
23788
23889
```HTTP
23990
https://atlas.microsoft.com/map/static/png?api-version=2022-08-01&style=main&layer=basic&sku=S1&zoom=14&height=500&Width=500&center=-74.040701, 40.698666&path=lc0000FF|fc0000FF|lw3|la0.80|fa0.50||-74.03995513916016 40.70090237454063|-74.04082417488098 40.70028420372218|-74.04113531112671 40.70049568385827|-74.04298067092896 40.69899904076542|-74.04271245002747 40.69879568992435|-74.04367804527283 40.6980961582905|-74.04364585876465 40.698055487620714|-74.04368877410889 40.698022951066996|-74.04168248176573 40.696444909137|-74.03901100158691 40.69837271818651|-74.03824925422668 40.69837271818651|-74.03809905052185 40.69903971085914|-74.03771281242369 40.699340668780984|-74.03940796852112 40.70058515602143|-74.03948307037354 40.70052821920425|-74.03995513916016 40.70090237454063
@@ -261,7 +112,7 @@ To render a circle and pushpins with custom labels:
261112
262113
4. Select the **GET** HTTP method.
263114
264-
5. Enter the following URL to the [Render service] (replace {`Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key):
115+
5. Enter the following URL to the [Render service]:
265116
266117
```HTTP
267118
https://atlas.microsoft.com/map/static/png?api-version=2022-08-01&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={Your-Azure-Maps-Subscription-key}
@@ -292,14 +143,8 @@ Similarly, you can change, add, and remove other style modifiers.
292143
> [!div class="nextstepaction"]
293144
> [Render - Get Map Image]
294145
295-
> [!div class="nextstepaction"]
296-
> [Data service]
297-
298146
[Azure Maps account]: quick-demo-map-app.md#create-an-azure-maps-account
299147
[Render - Get Map Image]: /rest/api/maps/render/getmapimage
300-
[Data service]: /rest/api/maps/data
301-
[Data Upload]: /rest/api/maps/data-v2/upload
302-
[Manage the pricing tier of your Azure Maps account]: how-to-manage-pricing-tier.md
303148
[path parameter]: /rest/api/maps/render/getmapimage#uri-parameters
304149
[Postman]: https://www.postman.com/
305150
[Render service]: /rest/api/maps/render/get-map-image

articles/azure-maps/migrate-from-bing-maps-web-services.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ The `iconType` value specifies the type of pin to create and can have the follow
393393
* `default` – The default pin icon.
394394
* `none` – No icon is displayed, only labels are rendered.
395395
* `custom` – Specifies a custom icon is to be used. A URL pointing to the icon image can be added to the end of the `pins` parameter after the pin location information.
396-
* `{udid}` – A Unique Data ID (UDID) for an icon stored in the Azure Maps Data Storage platform.
397396

398397
Pin styles in Azure Maps are added with the format `optionNameValue`, with multiple styles separated by pipe (`|`) characters like this `iconType|optionName1Value1|optionName2Value2`. Note the option names and values aren't separated. The following style option names can be used to style pushpins in Azure Maps:
399398

@@ -446,7 +445,7 @@ In Azure Maps, lines and polygons can also be added to a static map image by spe
446445

447446
> `&path=pathStyles||pathLocation1|pathLocation2|...`
448447
449-
When it comes to path locations, Azure Maps requires the coordinates to be in `longitude latitude` format whereas Bing Maps uses `latitude,longitude` format. Also note that **there is a space, not a comma separating** longitude and latitude in Azure Maps. Azure Maps doesn't support encoded paths currently. Larger data sets can be uploaded as a GeoJSON fills into the Azure Maps Data Storage API. For more information, see [Upload pins and path data](./how-to-render-custom-data.md#upload-pins-and-path-data).
448+
When it comes to path locations, Azure Maps requires the coordinates to be in `longitude latitude` format whereas Bing Maps uses `latitude,longitude` format. Also note that **there is a space, not a comma separating** longitude and latitude in Azure Maps. Azure Maps doesn't support encoded paths currently.
450449

451450
Path styles in Azure Maps are added with the format `optionNameValue`, with multiple styles separated by pipe (`|`) characters like this `optionName1Value1|optionName2Value2`. Note the option names and values aren't separated. The following style option names can be used to style paths in Azure Maps:
452451

articles/azure-maps/migrate-from-google-maps-web-services.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ The `iconType` specifies the type of pin to create. It can have the following va
329329
* `default` – The default pin icon.
330330
* `none` – No icon is displayed, only labels are rendered.
331331
* `custom` – Specifies a custom icon is to be used. A URL pointing to the icon image can be added to the end of the `pins` parameter after the pin location information.
332-
* `{udid}` – A Unique Data ID (UDID) for an icon stored in the Azure
333-
Maps Data Storage platform.
334332

335333
Add pin styles with the `optionNameValue` format. Separate multiple styles with the pipe (\|) characters. For example: `iconType|optionName1Value1|optionName2Value2`. The option names and values aren't separated. Use the following style option names to style markers:
336334

@@ -398,7 +396,7 @@ Add lines and polygons to a static map image by specifying the `path` parameter
398396
&path=pathStyles||pathLocation1|pathLocation2|...
399397
```
400398

401-
When it comes to path locations, Azure Maps requires the coordinates to be in "longitude latitude" format. Google Maps uses "latitude,longitude" format. A space, not a comma, separates longitude and latitude in the Azure Maps format. Azure Maps doesn't support encoded paths or addresses for points. For more information on how to Upload larger data sets as a GeoJSON file into the Azure Maps Data Storage API, see [Upload pins and path data].
399+
When it comes to path locations, Azure Maps requires the coordinates to be in "longitude latitude" format. Google Maps uses "latitude,longitude" format. A space, not a comma, separates longitude and latitude in the Azure Maps format. Azure Maps doesn't support encoded paths or addresses for points.
402400

403401
Add path styles with the `optionNameValue` format. Separate multiple styles by pipe (\|) characters, like this `optionName1Value1|optionName2Value2`. The option names and values aren't separated. Use the following style option names to style paths in Azure Maps:
404402

@@ -543,4 +541,3 @@ Learn more about Azure Maps REST services:
543541
[Time zone Windows to IANA]: /rest/api/maps/timezone/gettimezonewindowstoiana
544542
[Time Zone]: /rest/api/maps/timezone
545543
[Traffic]: /rest/api/maps/traffic
546-
[Upload pins and path data]: how-to-render-custom-data.md#upload-pins-and-path-data

0 commit comments

Comments
 (0)