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/spatial-io-add-simple-data-layer.md
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The simple data layer achieves this functionality by wrapping multiple rendering
19
19
20
20
The `SimpleDataLayer` class also provides a built-in popup feature with a popup template (which can be disabled if not needed). The popup appears when a feature is selected. This layer also supports clustered data. When a cluster is selected, the map zooms in to the cluster and expands it into individual points and subclusters.
21
21
22
-
The `SimpleDataLayer` class is intended to be used on large data sets that contain features that have many applied geometry types and styles. When used, this class adds an overhead of six layers containing style expressions. So, there are cases when it's more efficient to use the core rendering layers. For example, you can use a core layer to render a small number of geometry types and styles on a feature.
22
+
The `SimpleDataLayer` class is intended to be used on large data sets that contain features that have many applied geometry types and styles. When used, this class adds an overhead of six layers containing style expressions. So, there are cases when it's more efficient to use a core rendering layer. For example, you can use a core layer when you only need to render a few geometry types and styles on a feature.
23
23
24
24
## Use a simple data layer
25
25
@@ -111,21 +111,15 @@ The sample code renders the point feature using the simple data layer, and appea
111
111
:::image type="content" source="./media/spatial-io-add-simple-data-layer/simple-data-layer.png"alt-text="A screenshot of a map with coordinates of 0, 0 that shows a red dot over blue water; the red dot was added using the symbol layer.":::
112
112
113
113
> [!NOTE]
114
-
> The coordinates that you set when the map is initialized:
115
-
>
116
-
>   center: [-73.967605, 40.780452]
117
-
>
118
-
> Are overwritten by the value from the data source:
119
-
>
120
-
>   "coordinates": [0, 0]
114
+
> The value from the data source `"coordinates": [0, 0]` overrides the coordinates `center: [-73.967605, 40.780452]` that you set when the map was initialized.
121
115
122
116
The simple data layer is a powerful tool for the following scenarios:
123
117
124
118
- A data source includes several feature types.
125
119
- Features in the data set have several style properties that are individually set.
126
120
- You're not sure what the data set contains.
127
121
128
-
For example, when parsing XML data feeds, you might not know the features' exact style and geometry types. The [Simple data layer options] sample shows how the simple data layer renders the features of a KML file. You can also see the options provided by the `SimpleDataLayer` class. For the source code for this sample, see [Simple data layer options.html] in the Azure Maps code samples in GitHub.
122
+
For example, when parsing XML data feeds, you might not know the features' exact style and geometry types. The [Simple data layer options] sample shows how the simple data layer renders the features of a Keyhole Markup Language (KML) file. You can also see the options provided by the `SimpleDataLayer` class. For the source code for this sample, see [Simple data layer options.html] in the Azure Maps code samples in GitHub.
129
123
130
124
:::image type="content" source="./media/spatial-io-add-simple-data-layer/simple-data-layer-options.png"alt-text="A screenshot of map with a panel on the left showing simple data layer options.":::
131
125
@@ -136,16 +130,16 @@ For example, when parsing XML data feeds, you might not know the features' exact
136
130
> [!NOTE]
137
131
> This simple data layer uses the [popup template] class to display KML balloons or feature properties as a table. By default, all content rendered in the popup is sandboxed inside of an iFrame as a security feature. However, there are limitations:
138
132
>
139
-
> - All scripts, forms, pointer lock, and top navigation functionality is disabled. Links can open in a new tab when selected.
133
+
> - All scripts, forms, pointer lock, and top navigation functionalities are disabled. Links can open in a new tab when selected.
140
134
> - Older browsers that don't support the `srcdoc` parameter on iFrames can only render a small amount of content.
141
135
>
142
-
> If you trust the data loaded into the pop-ups, and want popup scripts to be able to access your application, you can disable this feature. Just set the popup templates'`sandboxContent` option to false.
136
+
> If you trust the data loaded into the pop-ups, and want popup scripts to be able to access your application, you can disable this feature. Just set the popup templates `sandboxContent` option to false.
143
137
144
138
## Default supported style properties
145
139
146
140
The simple data layer wraps several of the core rendering layers: bubble, symbol, line, polygon, and extruded polygon. It uses expressions to search for valid style properties on individual features.
147
141
148
-
The two main sets of supported property names are Azure Maps and GitHub. Most property names of Azure maps layer options are supported in the simple data layer as style properties of features. Expressions have been added to some layer options to support style property names that are commonly used by GitHub. [GitHub's GeoJSON map support] defines these property names, and they're used to style GeoJSON files that are stored and rendered within the platform. Most of GitHub's styling properties are supported in the simple data layer, except the `marker-symbol` styling properties.
142
+
The two main sets of supported property names are Azure Maps and GitHub. Most property names of Azure Maps layer options are supported in the simple data layer as style properties of features. Some layer options include expressions that support style property names that are commonly used by GitHub. [GitHub's GeoJSON map support] defines these property names, and they're used to style GeoJSON files that are stored and rendered within the platform. Most of GitHub's styling properties are supported in the simple data layer, except the `marker-symbol` styling properties.
149
143
150
144
If the reader comes across a less common style property, it converts it to the most similar Azure Maps style property. Additionally, you can override the default style expressions by using the `getLayers` function of the simple data layer and updating the options on any of the layers.
151
145
@@ -161,9 +155,9 @@ If a feature is a `Point` or a `MultiPoint`, and the feature doesn't have an `im
[Read and write spatial data]: spatial-io-read-write-spatial-data.md
254
248
[Simple data layer options.html]: https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Samples/Spatial%20IO%20Module/Simple%20data%20layer%20options/Simple%20data%20layer%20options.html
0 commit comments