You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-maps/map-add-controls.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.custom: mvc
13
13
14
14
# Add Map Controls to Azure Maps
15
15
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).
Copy file name to clipboardExpand all lines: articles/azure-maps/map-get-information-from-coordinate.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Show information about a coordinate with Azure Maps | Microsoft Docs
3
3
description: How to display information about an address on the map when a user selects a coordinate
4
4
author: jingjing-z
5
5
ms.author: jinzh
6
-
ms.date: 05/07/2018
6
+
ms.date: 08/31/2018
7
7
ms.topic: conceptual
8
8
ms.service: azure-maps
9
9
services: azure-maps
@@ -13,20 +13,24 @@ ms.custom: codepen
13
13
14
14
# Get information from a coordinate
15
15
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.
17
17
18
18
## Understand the code
19
19
20
-
<iframeheight='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
+
<iframeheight='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>.
21
21
</iframe>
22
22
23
23
In the code above, the first block of code constructs a map object. You can see [create a map](./map-create.md) for instructions.
24
24
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.
26
26
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.
28
28
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.
30
34
31
35
## Next steps
32
36
@@ -39,6 +43,6 @@ Learn more about the classes and methods used in this article:
Copy file name to clipboardExpand all lines: articles/azure-maps/map-route.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Show directions with Azure Maps | Microsoft Docs
3
3
description: How to display directions between two locations on a Javascript map
4
4
author: jingjing-z
5
5
ms.author: jinzh
6
-
ms.date: 05/07/2018
6
+
ms.date: 08/31/2018
7
7
ms.topic: conceptual
8
8
ms.service: azure-maps
9
9
services: azure-maps
@@ -17,23 +17,30 @@ This article shows you how to make a route request and show the route on the map
17
17
18
18
## Understand the code
19
19
20
-
<iframeheight='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
+
<iframeheight='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>.
21
21
</iframe>
22
22
23
23
In the code above, the first block of code constructs a map object. You can see [create a map](./map-create.md) for instructions.
24
24
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.
26
26
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.
28
28
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.
30
30
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.
32
36
33
37
## Next steps
34
38
35
39
Learn more about the classes and methods used in this article:
Copy file name to clipboardExpand all lines: articles/azure-maps/map-search-location.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Show search results with Azure Maps | Microsoft Docs
3
3
description: How to perform a search request with Azure Maps then display the results on a Javascript map
4
4
author: jingjing-z
5
5
ms.author: jinzh
6
-
ms.date: 08/26/2018
6
+
ms.date: 08/31/2018
7
7
ms.topic: conceptual
8
8
ms.service: azure-maps
9
9
services: azure-maps
@@ -22,7 +22,7 @@ This article shows you how to search for location of interest and show the searc
22
22
23
23
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.
24
24
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.
26
26
27
27
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.
0 commit comments