Skip to content

Commit 96e09fe

Browse files
committed
articles-about-the-spatial-io-module
1 parent 3ec4ae8 commit 96e09fe

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

articles/azure-maps/spatial-io-add-simple-data-layer.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The simple data layer achieves this functionality by wrapping multiple rendering
1919

2020
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.
2121

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.
2323

2424
## Use a simple data layer
2525

@@ -111,21 +111,15 @@ The sample code renders the point feature using the simple data layer, and appea
111111
:::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.":::
112112

113113
> [!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.
121115
122116
The simple data layer is a powerful tool for the following scenarios:
123117

124118
- A data source includes several feature types.
125119
- Features in the data set have several style properties that are individually set.
126120
- You're not sure what the data set contains.
127121

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.
129123

130124
:::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.":::
131125

@@ -136,16 +130,16 @@ For example, when parsing XML data feeds, you might not know the features' exact
136130
> [!NOTE]
137131
> 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:
138132
>
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.
140134
> - Older browsers that don't support the `srcdoc` parameter on iFrames can only render a small amount of content.
141135
>
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.
143137
144138
## Default supported style properties
145139

146140
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.
147141

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.
149143

150144
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.
151145

@@ -161,9 +155,9 @@ If a feature is a `Point` or a `MultiPoint`, and the feature doesn't have an `im
161155
| `radius` | `size`<sup>1</sup>, `marker-size`<sup>2</sup>, `scale`<sup>1</sup> | `8` |
162156
| `strokeColor` | `strokeColor`, `stroke` | `'#FFFFFF'` |
163157

164-
\[1\] The `size` and `scale` values are considered scalar values, and are multiplied by `8`
158+
<sup>1</sup> The `size` and `scale` values are considered scalar values, and are multiplied by `8`
165159

166-
\[2\] If the GitHub `marker-size` option is specified, the following values are used for the radius:
160+
<sup>2</sup> If the GitHub `marker-size` option is specified, the following values are used for the radius:
167161

168162
| Marker size | Radius |
169163
|-------------|--------|
@@ -191,7 +185,7 @@ If a feature is a `Point` or `MultiPoint`, and the feature has an `image` proper
191185
| `offset` | `offset` | `[0, 0]` |
192186
| `anchor` | `anchor` | `'bottom'` |
193187

194-
\[1\] If the GitHub `marker-size` option is specified, the following values are used for the icon size option.
188+
<sup>1</sup> If the GitHub `marker-size` option is specified, the following values are used for the icon size option.
195189

196190
| Marker size | Symbol size |
197191
|-------------|-------------|
@@ -237,18 +231,18 @@ Learn more about the classes and methods used in this article:
237231
- [SimpleDataLayer]
238232
- [SimpleDataLayerOptions]
239233

240-
See the following articles for more code samples to add to your maps:
234+
See the following articles to get more code samples to add to your maps:
241235

242236
- [Read and write spatial data]
243237
- [Add an OGC map layer]
244238
- [Connect to a WFS service]
245-
- [Leverage core operations]
239+
- [Use core operations]
246240
- [Supported data format details]
247241

248242
[Add an OGC map layer]: spatial-io-add-ogc-map-layer.md
249243
[Connect to a WFS service]: spatial-io-connect-wfs-service.md
250244
[GitHub's GeoJSON map support]: https://docs.github.com/en/repositories/working-with-files/using-files/working-with-non-code-files#mapping-geojsontopojson-files-on-github
251-
[Leverage core operations]: spatial-io-core-operations.md
245+
[Use core operations]: spatial-io-core-operations.md
252246
[popup template]: map-add-popup.md#add-popup-templates-to-the-map
253247
[Read and write spatial data]: spatial-io-read-write-spatial-data.md
254248
[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

Comments
 (0)