Skip to content

Commit b4f3c76

Browse files
authored
Merge pull request #50703 from walsehgal/AzureMapsHowtoUp
Azure maps how-to guides update
2 parents 06b8638 + e46c09a commit b4f3c76

File tree

5 files changed

+28
-17
lines changed

5 files changed

+28
-17
lines changed

articles/azure-maps/choose-map-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Map style functionalities in Azure Maps| Microsoft Docs
33
description: Learn about Azure Maps style related functionalities.
44
author: walsehgal
55
ms.author: v-musehg
6-
ms.date: 08/29/2018
6+
ms.date: 08/31/2018
77
ms.topic: how-to-guides
88
ms.service: azure-maps
99
services: azure-maps

articles/azure-maps/map-add-controls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: mvc
1313

1414
# Add Map Controls to Azure Maps
1515

16-
This article shows you how to add map controls to a map. You will also learn how to create a map with all controls and a style picker.
16+
This article shows you how to add map controls to a map. You will also learn how to create a map with all controls and a [style picker](https://docs.microsoft.com/azure/azure-maps/choose-map-style#adding-the-style-picker).
1717

1818
## Add zoom control
1919

articles/azure-maps/map-get-information-from-coordinate.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Show information about a coordinate with Azure Maps | Microsoft Docs
33
description: How to display information about an address on the map when a user selects a coordinate
44
author: jingjing-z
55
ms.author: jinzh
6-
ms.date: 05/07/2018
6+
ms.date: 08/31/2018
77
ms.topic: conceptual
88
ms.service: azure-maps
99
services: azure-maps
@@ -13,20 +13,24 @@ ms.custom: codepen
1313

1414
# Get information from a coordinate
1515

16-
This article shows you how to make a reverse address search, and upon a mouse click show the address of the clicked location in a popup.
16+
This article shows you how to make a reverse address search, and upon a mouse click show the address of the clicked location in a popup.
1717

1818
## Understand the code
1919

20-
<iframe height='500' scrolling='no' title='Get information from a coordinate' src='//codepen.io/azuremaps/embed/ddXzoB/?height=516&theme-id=0&default-tab=js,result&embed-version=2&editable=true' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/ddXzoB/'>Get information from a coordinate</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
20+
<iframe height='500' scrolling='no' title='Get information from a coordinate (Service Module)' src='//codepen.io/azuremaps/embed/ejEYMZ/?height=265&theme-id=0&default-tab=js,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/ejEYMZ/'>Get information from a coordinate (Service Module)</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
2121
</iframe>
2222

2323
In the code above, the first block of code constructs a map object. You can see [create a map](./map-create.md) for instructions.
2424

25-
The second block of code updates the style of mouse cursor to a pointer.
25+
The line in the second block of code instantiates a service client.
2626

27-
The third block of code creates a popup. You can see [add a popup on the map](./map-add-popup.md) for instructions.
27+
The third block of code updates the style of mouse cursor to a pointer.
2828

29-
The last code block adds an event listener for mouse clicks. Upon a mouse click, it sends an [XMLHttpRequest](https://xhr.spec.whatwg.org/) to [Azure Maps Reverse Address Search API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse). For a successful response, it collects the address for the clicked location, and defines the popup content and position via [setPopupOptions](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.popup?view=azure-iot-typescript-latest#setpopupoptions) function of the popup class
29+
The fourth code block creates a popup. You can see [add a popup on the map](./map-add-popup.md) for instructions.
30+
31+
The last block of code adds an event listener for mouse clicks. Upon a mouse click, it creates a search query with the co-ordinates of the clicked point. Then it uses the map's [getSearchAddressReverse](https://docs.microsoft.com/javascript/api/azure-maps-rest/services.search?view=azure-iot-typescript-latest#getsearchaddressreverse) endpoint to query the address for the co-ordinates.
32+
33+
For a successful response, it collects the address for the clicked location, and defines the popup content and position via [setPopupOptions](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.popup?view=azure-iot-typescript-latest#setpopupoptions) function of the popup class.
3034

3135
## Next steps
3236

@@ -39,6 +43,6 @@ Learn more about the classes and methods used in this article:
3943
* [open](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.popup?view=azure-iot-typescript-latest#open)
4044
* [close](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.popup?view=azure-iot-typescript-latest#close)
4145

42-
For more code examples to add to your maps, see the following articles:
46+
For more code examples to add to your maps, see the following articles:
4347
* [Show directions from A to B](./map-route.md)
4448
* [Show traffic](./map-show-traffic.md)

articles/azure-maps/map-route.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Show directions with Azure Maps | Microsoft Docs
33
description: How to display directions between two locations on a Javascript map
44
author: jingjing-z
55
ms.author: jinzh
6-
ms.date: 05/07/2018
6+
ms.date: 08/31/2018
77
ms.topic: conceptual
88
ms.service: azure-maps
99
services: azure-maps
@@ -17,23 +17,30 @@ This article shows you how to make a route request and show the route on the map
1717

1818
## Understand the code
1919

20-
<iframe height='500' scrolling='no' title='Show directions from A to B on a map' src='//codepen.io/azuremaps/embed/zRyNmP/?height=469&theme-id=0&default-tab=js,result&embed-version=2&editable=true' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/zRyNmP/'>Show directions from A to B on a map</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
20+
<iframe height='500' scrolling='no' title='Show directions from A to B on a map (Service Module)' src='//codepen.io/azuremaps/embed/RBZbep/?height=265&theme-id=0&default-tab=js,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/RBZbep/'>Show directions from A to B on a map (Service Module)</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
2121
</iframe>
2222

2323
In the code above, the first block of code constructs a map object. You can see [create a map](./map-create.md) for instructions.
2424

25-
The second block of code creates and adds pins on the map to represent the start and end point of the route. You can see [add a pin on the map](map-add-pin.md) for instructions.
25+
The line in the second block of code instantiates a service client.
2626

27-
The third block of code uses [setCameraBounds](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#setcamerabounds) function of the map class to set the bounding box of the map based on the start and end point of the route.
27+
The third code block initializes the [line String Layer](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#addlinestrings) on the map.
2828

29-
The fourth block of code sends an [XMLHttpRequest](https://xhr.spec.whatwg.org/) to [Azure Maps Route API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections).
29+
The fourth block of code creates and adds pins on the map to represent the start and end point of the route. You can see [add a pin on the map](map-add-pin.md) for instructions.
3030

31-
The last block of code parses the incoming response. For a successful response, it collects the latitude and longitude information for each waypoint. It creates an array of lines by connecting each waypoint to its subsequent waypoint. It adds all those lines onto the map to render the route. You can see [add a line on the map](./map-add-shape.md#addALine) for instructions.
31+
The next block of code uses [setCameraBounds](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#setcamerabounds) function of the map class to set the bounding box of the map based on the start and end point of the route.
32+
33+
The sixth code block constructs a route query.
34+
35+
The last block of code queries the Azure Maps routing service through the [getRouteDirections](https://docs.microsoft.com/javascript/api/azure-maps-rest/services.route?view=azure-iot-typescript-latest#getroutedirections) method to get a route between the start and destination point. The response is then parsed into GeoJSON format using the [getGeoJsonRoutes](https://docs.microsoft.com/javascript/api/azure-maps-rest/atlas.service.geojson.geojsonroutedirectionsresponse?view=azure-iot-typescript-latest#getgeojsonroutes) method. It adds all those lines onto the map to render the route. You can see [add a line on the map](./map-add-shape.md#addALine) for instructions.
3236

3337
## Next steps
3438

3539
Learn more about the classes and methods used in this article:
3640

41+
* [getRouteDirections](https://docs.microsoft.com/javascript/api/azure-maps-rest/services.route?view=azure-iot-typescript-latest#getroutedirections)
42+
* [getGeoJsonRoutes](https://docs.microsoft.com/javascript/api/azure-maps-rest/atlas.service.geojson.geojsonroutedirectionsresponse?view=azure-iot-typescript-latest#getgeojsonroutes)
43+
* [Line String Layer](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#addlinestrings)
3744
* [Map](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest)
3845
* [setCameraBounds](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#setcamerabounds)
3946
* [addLinestrings](https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.map?view=azure-iot-typescript-latest#addlinestrings)

articles/azure-maps/map-search-location.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Show search results with Azure Maps | Microsoft Docs
33
description: How to perform a search request with Azure Maps then display the results on a Javascript map
44
author: jingjing-z
55
ms.author: jinzh
6-
ms.date: 08/26/2018
6+
ms.date: 08/31/2018
77
ms.topic: conceptual
88
ms.service: azure-maps
99
services: azure-maps
@@ -22,7 +22,7 @@ This article shows you how to search for location of interest and show the searc
2222

2323
In the code above, the first block of code constructs a map object and instantiates a client service. You can see [create a map](./map-create.md) for instructions.
2424

25-
The second block of code uses Fuzzy search [Azure Maps Fuzzy Search API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) to search for point of interest. Fuzzy search API can handle any combination of fuzzy inputs. The response from the fuzzy search service is then parsed into GeoJSON format and pins are added to the map to show the points of interest on the map.
25+
The second block of code uses Fuzzy search [Azure Maps Fuzzy Search API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) to search for point of interest. Fuzzy search API can handle any combination of fuzzy inputs. The response from the fuzzy search service is then parsed into GeoJSON format using the [getGeoJsonSearchResponse](https://docs.microsoft.com/javascript/api/azure-maps-rest/atlas.service.geojson.geojsonsearchresponse?view=azure-iot-typescript-latest#geojsonsearchresponse) method. The pins are then added to the map to show the points of interest on the map.
2626

2727
The last block of code adds camera bounds for the map by using the Map's [setCameraBounds](https://docs.microsoft.com/javascript/api/azure-maps-control/models.cameraboundsoptions?view=azure-iot-typescript-latest) property.
2828

0 commit comments

Comments
 (0)