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/android-map-add-line-layer.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: Add a line layer to Android maps | Microsoft Azure Maps
3
3
description: Learn how to add lines to maps. See examples that use the Azure Maps Android SDK to add line layers to maps and to customize lines with symbols and color gradients.
4
-
author: eriklindeman
5
-
ms.author: eriklind
4
+
author: sinnypan
5
+
ms.author: sipa
6
6
ms.date: 2/26/2021
7
7
ms.topic: conceptual
8
8
ms.service: azure-maps
@@ -85,7 +85,7 @@ The following screenshot shows the above code rendering a line in a line layer.
85
85
86
86
## Data-driven line style
87
87
88
-
The following code creates two line features and adds a speed limit value as a property to each line. A line layer uses a data-drive style expression color the lines based on the speed limit value. Since the line data overlays along roads, the code below adds the line layer below the label layer so that road labels can still clearly be read.
88
+
The following code creates two line features and adds a speed limit value as a property to each line. A line layer uses a data-drive style expression color the lines based on the speed limit value. Since the line data overlays along roads, the following code adds the line layer below the label layer so that road labels can still clearly be read.
89
89
90
90
::: zone pivot="programming-language-java-android"
The following screenshot shows the above code rendering two lines in a line layer with their color being retrieved from a data driven style expression based on a property in the line features.
199
+
The following screenshot shows the above code rendering two lines in a line layer, the color retrieved from a data driven style expression based on a property in the line feature.
200
200
201
201

202
202
@@ -323,7 +323,7 @@ The following screenshot shows the above code displaying a line rendered using a
323
323
324
324
## Add symbols along a line
325
325
326
-
This sample shows how to add arrow icons along a line on the map. When using a symbol layer, set the `symbolPlacement` option to `SymbolPlacement.LINE`. This option will render the symbols along the line and rotate the icons (0 degrees = right).
326
+
This sample shows how to add arrow icons along a line on the map. When using a symbol layer, set the `symbolPlacement` option to `SymbolPlacement.LINE`. This renders the symbols along the line and rotates the icons (0 degrees = right).
327
327
328
328
::: zone pivot="programming-language-java-android"
329
329
@@ -451,7 +451,7 @@ For this sample, the following image was loaded into the drawable folder of the
|`OnCameraIdle`|`()`| <p>Fired after the last frame rendered before the map enters an "idle" state:<ul><li>No camera transitions are in progress.</li><li>All currently requested tiles have loaded.</li><li>All fade/transition animations have completed.</li></ul></p> |
24
-
|`OnCameraMove`|`()`|Fired repeatedly during an animated transition from one view to another, as the result of either user interaction or methods. |
25
-
|`OnCameraMoveCanceled`|`()`|Fired when a movement request to the camera has been canceled. |
26
-
|`OnCameraMoveStarted`|`(int reason)`|Fired just before the map begins a transition from one view to another, as the result of either user interaction or methods. The `reason` argument of the event listener returns an integer value that provides details of how the camera movement was initiated. The following list outlines the possible reasons:<ul><li>1: Gesture</li><li>2: Developer animation</li><li>3: API Animation</li></ul> |
27
-
|`OnClick`|`(double lat, double lon): boolean`|Fired when the map is pressed and released at the same point on the map. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
28
-
|`OnFeatureClick`|`(List<Feature>): boolean`|Fired when the map is pressed and released at the same point on a feature. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
29
-
|`OnLayerAdded`|`(Layer layer)`|Fired when a layer is added to the map. |
30
-
|`OnLayerRemoved`|`(Layer layer)`|Fired when a layer is removed from the map. |
31
-
|`OnLoaded`|`()`|Fired immediately after all necessary resources have been downloaded and the first visually complete rendering of the map has occurred. |
32
-
|`OnLongClick`|`(double lat, double lon): boolean`|Fired when the map is pressed, held for a moment, and then released at the same point on the map. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
33
-
|`OnLongFeatureClick `|`(List<Feature>): boolean`|Fired when the map is pressed, held for a moment, and then released at the same point on a feature. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
34
-
|`OnReady`|`(AzureMap map)`|Fired when the map initially is loaded or when the app orientation change and the minimum required map resources are loaded and the map is ready to be programmatically interacted with. |
35
-
|`OnSourceAdded`|`(Source source)`|Fired when a `DataSource` or `VectorTileSource` is added to the map. |
36
-
|`OnSourceRemoved`|`(Source source)`|Fired when a `DataSource` or `VectorTileSource` is removed from the map. |
37
-
|`OnStyleChange`|`()`|Fired when the map's style loads or changes. |
23
+
|`OnCameraIdle`|`()`| <p>Fires after the last frame rendered before the map enters an "idle" state:<ul><li>No camera transitions are in progress.</li><li>All currently requested tiles have loaded.</li><li>All fade/transition animations have completed.</li></ul></p> |
24
+
|`OnCameraMove`|`()`|Fires repeatedly during an animated transition from one view to another, as the result of either user interaction or methods. |
25
+
|`OnCameraMoveCanceled`|`()`|Fires when a movement request to the camera has been canceled. |
26
+
|`OnCameraMoveStarted`|`(int reason)`|Fires just before the map begins a transition from one view to another, as the result of either user interaction or methods. The `reason` argument of the event listener returns an integer value that provides details of how the camera movement was initiated. The following list outlines the possible reasons:<ul><li>1: Gesture</li><li>2: Developer animation</li><li>3: API Animation</li></ul> |
27
+
|`OnClick`|`(double lat, double lon): boolean`|Fires when the map is pressed and released at the same point on the map. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
28
+
|`OnFeatureClick`|`(List<Feature>): boolean`|Fires when the map is pressed and released at the same point on a feature. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
29
+
|`OnLayerAdded`|`(Layer layer)`|Fires when a layer is added to the map. |
30
+
|`OnLayerRemoved`|`(Layer layer)`|Fires when a layer is removed from the map. |
31
+
|`OnLoaded`|`()`|Fires immediately after all necessary resources have been downloaded and the first visually complete rendering of the map has occurred. |
32
+
|`OnLongClick`|`(double lat, double lon): boolean`|Fires when the map is pressed, held for a moment, and then released at the same point on the map. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
33
+
|`OnLongFeatureClick `|`(List<Feature>): boolean`|Fires when the map is pressed, held for a moment, and then released at the same point on a feature. This event handler returns a boolean value indicating if the event should be consumed or passed further to other event listeners. |
34
+
|`OnReady`|`(AzureMap map)`|Fires when the map initially loads, the orientation changes, the minimum required map resources load and the map is ready to be interacted with programmatically. |
35
+
|`OnSourceAdded`|`(Source source)`|Fires when a `DataSource` or `VectorTileSource` is added to the map. |
36
+
|`OnSourceRemoved`|`(Source source)`|Fires when a `DataSource` or `VectorTileSource` is removed from the map. |
37
+
|`OnStyleChange`|`()`|Fires when the map's style loads or changes. |
38
38
39
39
The following code shows how to add the `OnClick`, `OnFeatureClick`, and `OnCameraMove` events to the map.
40
40
@@ -90,7 +90,7 @@ For more information, see the [Navigating the map](how-to-use-android-map-contro
90
90
91
91
## Scope feature events to layer
92
92
93
-
When adding the `OnFeatureClick` or `OnLongFeatureClick` events to the map, a layer instance or layer ID can be passed in as a second parameter. When a layer is passed in, the event will only fire if the event occurs on that layer. Events scoped to layers are supported by the symbol, bubble, line, and polygon layers.
93
+
When the `OnFeatureClick` or `OnLongFeatureClick` events are added to the map, a layer instance or layer ID can be passed in as a second parameter. When a layer is passed in, an event fires if it occurs on that layer. Events scoped to layers are supported by the symbol, bubble, line, and polygon layers.
94
94
95
95
::: zone pivot="programming-language-java-android"
0 commit comments