Skip to content

Commit e3a2fb4

Browse files
authored
Merge pull request #107740 from stevemunk/create-data-source
Grammatical improvements and end link creation for the 3 Create-source articles
2 parents a0b99eb + 50716a3 commit e3a2fb4

File tree

3 files changed

+139
-70
lines changed

3 files changed

+139
-70
lines changed

articles/azure-maps/create-data-source-android-sdk.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ map.sources.add(source)
303303

304304
::: zone-end
305305

306-
The `importDataFromUrl` method provides an easy way to load a GeoJSON feed into a data source but provides limited control on how the data is loaded and what happens after it's been loaded. The following code is a reusable class for importing data from the web or assets folder and returning it to the UI thread via a callback function. Next, add additional post load logic in the callback to process the data, add it to the map, calculate its bounding box, and update the maps camera.
306+
The `importDataFromUrl` method provides an easy way to load a GeoJSON feed into a data source but provides limited control on how the data is loaded and what happens after it's been loaded. The following code is a reusable class for importing data from the web or assets folder and returning it to the UI thread via a callback function. Next, add more post load logic in the callback to process the data, add it to the map, calculate its bounding box, and update the maps camera.
307307

308308
::: zone pivot="programming-language-java-android"
309309

@@ -767,12 +767,12 @@ A vector tile source describes how to access a vector tile layer. Use the `Vecto
767767
- Changing the style of the data in the vector maps doesn't require downloading the data again, since the new style can be applied on the client. In contrast, changing the style of a raster tile layer typically requires loading tiles from the server then applying the new style.
768768
- Since the data is delivered in vector form, there's less server-side processing required to prepare the data. As a result, the newer data can be made available faster.
769769

770-
Azure Maps adheres to the [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec), an open standard. Azure Maps provides the following vector tiles services as part of the platform:
770+
Azure Maps adheres to the [Mapbox Vector Tile Specification], an open standard. Azure Maps provides the following vector tiles services as part of the platform:
771771

772-
- Road tiles [documentation](/rest/api/maps/render-v2/get-map-tile)
773-
- Traffic incidents [documentation](/rest/api/maps/traffic/gettrafficincidenttile)
774-
- Traffic flow [documentation](/rest/api/maps/traffic/gettrafficflowtile)
775-
- Azure Maps Creator also allows custom vector tiles to be created and accessed through the [Render V2-Get Map Tile API](/rest/api/maps/render-v2/get-map-tile)
772+
- [Road tiles]
773+
- [Traffic incidents]
774+
- [Traffic flow]
775+
- Azure Maps Creator also allows custom vector tiles to be created and accessed through the [Render V2-Get Map Tile API]
776776

777777
> [!TIP]
778778
> When using vector or raster image tiles from the Azure Maps render service with the web SDK, you can replace `atlas.microsoft.com` with the placeholder `azmapsdomain.invalid`. This placeholder will be replaced with the same domain used by the map and will automatically append the same authentication details as well. This greatly simplifies authentication with the render service when using Azure Active Directory authentication.
@@ -871,13 +871,13 @@ map.layers.add(layer, "labels")
871871

872872
## Connecting a data source to a layer
873873

874-
Data is rendered on the map using rendering layers. A single data source can be referenced by one or more rendering layers. The following rendering layers require a data source:
874+
Data is rendered on the map using rendering layers. One or more rendering layers can reference a single data source. The following rendering layers require a data source:
875875

876-
- [Bubble layer](map-add-bubble-layer-android.md) - renders point data as scaled circles on the map.
877-
- [Symbol layer](how-to-add-symbol-to-android-map.md) - renders point data as icons or text.
878-
- [Heat map layer](map-add-heat-map-layer-android.md) - renders point data as a density heat map.
879-
- [Line layer](android-map-add-line-layer.md) - render a line and or render the outline of polygons.
880-
- [Polygon layer](how-to-add-shapes-to-android-map.md) - fills the area of a polygon with a solid color or image pattern.
876+
- [Bubble layer] - renders point data as scaled circles on the map.
877+
- [Symbol layer]- renders point data as icons or text.
878+
- [Heat map layer] - renders point data as a density heat map.
879+
- [Line layer] - render a line and or render the outline of polygons.
880+
- [Polygon layer] - fills the area of a polygon with a solid color or image pattern.
881881

882882
The following code shows how to create a data source, add it to the map, and connect it to a bubble layer. And then, import GeoJSON point data from a remote location into the data source.
883883

@@ -917,7 +917,7 @@ map.sources.add(source)
917917

918918
There are more rendering layers that don't connect to these data sources, but they directly load the data for rendering.
919919

920-
- [Tile layer](how-to-add-tile-layer-android-map.md) - superimposes a raster tile layer on top of the map.
920+
- [Tile layer] - superimposes a raster tile layer on top of the map.
921921

922922
## One data source with multiple layers
923923

@@ -1035,3 +1035,18 @@ See the following articles for more code samples to add to your maps:
10351035
10361036
> [!div class="nextstepaction"]
10371037
> [Web SDK Code samples](/samples/browse/?products=azure-maps)
1038+
1039+
<!--------- learn.microsoft.com links --------------->
1040+
[Bubble layer]: map-add-bubble-layer-android.md
1041+
[Symbol layer]: how-to-add-symbol-to-android-map.md
1042+
[Heat map layer]: map-add-heat-map-layer-android.md
1043+
[Line layer]: android-map-add-line-layer.md
1044+
[Polygon layer]: how-to-add-shapes-to-android-map.md
1045+
[Tile layer]: how-to-add-tile-layer-android-map.md
1046+
<!--------- REST API Links --------------->
1047+
[Road tiles]: /rest/api/maps/render-v2/get-map-tile
1048+
[Traffic incidents]: /rest/api/maps/traffic/gettrafficincidenttile
1049+
[Traffic flow]: /rest/api/maps/traffic/gettrafficflowtile
1050+
[Render V2-Get Map Tile API]: /rest/api/maps/render-v2/get-map-tile
1051+
<!--------- External Links --------------->
1052+
[Mapbox Vector Tile Specification]: https://github.com/mapbox/vector-tile-spec

articles/azure-maps/create-data-source-ios-sdk.md

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ feature.addProperty("custom-property", value: "value")
4747
source.add(feature: feature)
4848
```
4949

50-
Alternatively the properties can be loaded into a dictionary (JSON) first then passed into the feature when creating it, as shown below.
50+
Alternatively the properties can be loaded into a dictionary (JSON) first then passed into the feature when creating it, as the following code demonstrates:
5151

5252
```swift
5353
//Create a dictionary to store properties for the feature.
@@ -108,7 +108,7 @@ let featureCollection = FeatureCollection(features)
108108

109109
### Serialize and deserialize GeoJSON
110110

111-
The feature collection, feature, and geometry classes all have `fromJson(_:)` and `toJson()` static methods, which help with serialization. The formatted valid JSON String passed through the `fromJson()` method will create the geometry object. This `fromJson()` method also means you can use `JSONSerialization` or other serialization/deserialization strategies. The following code shows how to take a stringified GeoJSON feature and deserialize it into the `Feature` class, then serialize it back into a GeoJSON string.
111+
The feature collection, feature, and geometry classes all have `fromJson(_:)` and `toJson()` static methods, which help with serialization. The formatted valid JSON String passed through the `fromJson()` method creates the geometry object. This `fromJson()` method also means you can use `JSONSerialization` or other serialization/deserialization strategies. The following code shows how to take a stringified GeoJSON feature and deserialize it into the `Feature` class, then serialize it back into a GeoJSON string.
112112

113113
```swift
114114
// Take a stringified GeoJSON object.
@@ -138,7 +138,7 @@ let featureString = feature.toJson()
138138

139139
Most GeoJSON files contain a `FeatureCollection`. Read GeoJSON files as strings and use the `FeatureCollection.fromJson(_:)` method to deserialize it.
140140

141-
The `DataSource` class has a built in method called `importData(fromURL:)` that can load in GeoJSON files using a URL to a file on the web or the device.
141+
The `DataSource` class has a built-in method called `importData(fromURL:)` that can load in GeoJSON files using a URL to a file on the web or the device.
142142

143143
```swift
144144
// Create a data source.
@@ -156,7 +156,7 @@ source.importData(fromURL: url)
156156
map.sources.add(source)
157157
```
158158

159-
The `importData(fromURL:)` method provides an easily way to load a GeoJSON feed into a data source but provides limited control on how the data is loaded and what happens after its been loaded. The following code is a reusable class for importing data from the web or assets folder and returning it to the UI thread via a callback function. In the callback you can then add additional post load logic to process the data, add it to the map, calculate its bounding box, and update the maps camera.
159+
The `importData(fromURL:)` method provides a way to load a GeoJSON feed into a data source but provides limited control on how the data is loaded and what happens after it's been loaded. The following code is a reusable class for importing data from the web or assets folder and returning it to the UI thread via a callback function. In the callback, you can then add more post load logic to process the data, add it to the map, calculate its bounding box, and update the maps camera.
160160

161161
```swift
162162
import Foundation
@@ -182,7 +182,7 @@ public class Utils: NSObject {
182182
}
183183
```
184184

185-
The code below shows how to use this utility to import GeoJSON data as a string and return it to the main thread via a callback. In the callback, the string data can be serialized into a GeoJSON Feature collection and added to the data source. Optionally, update the maps camera to focus in on the data.
185+
The following code shows how to use this utility to import GeoJSON data as a string and return it to the main thread via a callback. In the callback, the string data can be serialized into a GeoJSON Feature collection and added to the data source. Optionally, update the maps camera to focus in on the data.
186186

187187
```swift
188188
// Create a data source and add it to the map.
@@ -229,7 +229,7 @@ Utils.importData(fromURL: url) { result in
229229

230230
### Update a feature
231231

232-
The `DataSource` class makes its easy to add and remove features. Updating the geometry or properties of a feature requires replacing the feature in the data source. There are two methods that can be used to update a feature(s):
232+
The `DataSource` class makes it easy to add and remove features. Updating the geometry or properties of a feature requires replacing the feature in the data source. There are two methods that can be used to update a feature(s):
233233

234234
1. Create the new feature(s) with the desired updates and replace all features in the data source using the `set` method. This method works well when you want to update all features in a data source.
235235

@@ -307,12 +307,12 @@ A vector tile source describes how to access a vector tile layer. Use the `Vecto
307307
- Changing the style of the data in the vector maps doesn't require downloading the data again, since the new style can be applied on the client. In contrast, changing the style of a raster tile layer typically requires loading tiles from the server then applying the new style.
308308
- Since the data is delivered in vector form, there's less server-side processing required to prepare the data. As a result, the newer data can be made available faster.
309309

310-
Azure Maps adheres to the [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec), an open standard. Azure Maps provides the following vector tiles services as part of the platform:
310+
Azure Maps adheres to the [Mapbox Vector Tile Specification], an open standard. Azure Maps provides the following vector tiles services as part of the platform:
311311

312-
- Road tiles [documentation](/rest/api/maps/render-v2/get-map-tile)
313-
- Traffic incidents [documentation](/rest/api/maps/traffic/gettrafficincidenttile)
314-
- Traffic flow [documentation](/rest/api/maps/traffic/gettrafficflowtile)
315-
- Azure Maps Creator also allows custom vector tiles to be created and accessed through the [Render V2-Get Map Tile API](/rest/api/maps/render-v2/get-map-tile)
312+
- [Road tiles]
313+
- [Traffic incidents]
314+
- [Traffic flow]
315+
- Azure Maps Creator also allows custom vector tiles to be created and accessed through the [Render V2-Get Map Tile API]
316316

317317
> [!TIP]
318318
> When using vector or raster image tiles from the Azure Maps render service with the iOS SDK, you can replace `atlas.microsoft.com` with the `AzureMap`'s property' `domainPlaceholder`. This placeholder will be replaced with the same domain used by the map and will automatically append the same authentication details as well. This greatly simplifies authentication with the render service when using Azure Active Directory authentication.
@@ -375,13 +375,13 @@ map.layers.insertLayer(layer, below: "labels")
375375

376376
## Connect a data source to a layer
377377

378-
Data is rendered on the map using rendering layers. A single data source can be referenced by one or more rendering layers. The following rendering layers require a data source:
378+
Data is rendered on the map using rendering layers. One or more rendering layers can reference a single data source. The following rendering layers require a data source:
379379

380-
- [Bubble layer](add-bubble-layer-map-ios.md) - renders point data as scaled circles on the map.
381-
- [Symbol layer](add-symbol-layer-ios.md) - renders point data as icons or text.
382-
- [Heat map layer](add-heat-map-layer-ios.md) - renders point data as a density heat map.
383-
- [Line layer](add-line-layer-map-ios.md) - render a line and or render the outline of polygons.
384-
- [Polygon layer](add-polygon-layer-map-ios.md) - fills the area of a polygon with a solid color or image pattern.
380+
- [Bubble layer] - renders point data as scaled circles on the map.
381+
- [Symbol layer]- renders point data as icons or text.
382+
- [Heat map layer] - renders point data as a density heat map.
383+
- [Line layer] - render a line and or render the outline of polygons.
384+
- [Polygon layer] - fills the area of a polygon with a solid color or image pattern.
385385

386386
The following code shows how to create a data source, add it to the map, import GeoJSON point data from a remote location into the data source, and then connect it to a bubble layer.
387387

@@ -406,9 +406,9 @@ let layer = BubbleLayer(source: source)
406406
map.layers.addLayer(layer)
407407
```
408408

409-
There are additional rendering layers that don't connect to these data sources, but they directly load the data for rendering.
409+
There are other rendering layers that don't connect to these data sources, but they directly load the data for rendering.
410410

411-
- [Tile layer](add-tile-layer-map-ios.md) - superimposes a raster tile layer on top of the map.
411+
- [Tile layer] - superimposes a raster tile layer on top of the map.
412412

413413
## One data source with multiple layers
414414

@@ -418,7 +418,7 @@ Multiple layers can be connected to a single data source. There are many differe
418418

419419
In most mapping platforms, you would need a polygon object, a line object, and a pin for each position in the polygon. As the polygon is modified, you would need to manually update the line and pins, which can quickly become complex.
420420

421-
With Azure Maps, all you need is a single polygon in a data source as shown in the code below.
421+
With Azure Maps, all you need is a single polygon in a data source as shown in the following code.
422422

423423
```swift
424424
// Create a data source and add it to the map.
@@ -471,10 +471,33 @@ map.layers.addLayers([polygonLayer, lineLayer, bubbleLayer])
471471

472472
See the following articles for more code samples to add to your maps:
473473

474-
- [Cluster point data](clustering-point-data-ios-sdk.md)
475-
- [Add a symbol layer](Add-symbol-layer-ios.md)
476-
- [Add a bubble layer](add-bubble-layer-map-ios.md)
477-
- [Add a line layer](add-line-layer-map-ios.md)
478-
- [Add a polygon layer](Add-polygon-layer-map-ios.md)
479-
- [Add a heat map](Add-heat-map-layer-ios.md)
480-
- [Web SDK Code samples](/samples/browse/?products=azure-maps)
474+
- [Cluster point data]
475+
- [Add a symbol layer]
476+
- [Add a bubble layer]
477+
- [Add a line layer]
478+
- [Add a polygon layer]
479+
- [Add a heat map]
480+
- [Web SDK Code samples]
481+
482+
<!--------- learn.microsoft.com links --------------->
483+
[Cluster point data]: clustering-point-data-ios-sdk.md
484+
[Add a symbol layer]: Add-symbol-layer-ios.md
485+
[Add a bubble layer]: add-bubble-layer-map-ios.md
486+
[Add a line layer]: add-line-layer-map-ios.md
487+
[Add a polygon layer]: Add-polygon-layer-map-ios.md
488+
[Add a heat map]: Add-heat-map-layer-ios.md
489+
[Web SDK Code samples]: /samples/browse/?products=azure-maps
490+
<!--------- learn.microsoft.com links --------------->
491+
[Bubble layer]: add-bubble-layer-map-ios.md
492+
[Symbol layer]: Add-symbol-layer-ios.md
493+
[Heat map layer]: Add-heat-map-layer-ios.md
494+
[Line layer]: add-line-layer-map-ios.md
495+
[Polygon layer]: Add-polygon-layer-map-ios.md
496+
[Tile layer]: how-to-add-tile-layer-android-map.md
497+
<!--------- REST API Links --------------->
498+
[Road tiles]: /rest/api/maps/render-v2/get-map-tile
499+
[Traffic incidents]: /rest/api/maps/traffic/gettrafficincidenttile
500+
[Traffic flow]: /rest/api/maps/traffic/gettrafficflowtile
501+
[Render V2-Get Map Tile API]: /rest/api/maps/render-v2/get-map-tile
502+
<!--------- External Links --------------->
503+
[Mapbox Vector Tile Specification]: https://github.com/mapbox/vector-tile-spec

0 commit comments

Comments
 (0)