Skip to content

Commit 3fa3695

Browse files
committed
Updated old/broken references to Amazon AWS.
1 parent 9351527 commit 3fa3695

File tree

5 files changed

+56
-51
lines changed

5 files changed

+56
-51
lines changed

articles/azure-maps/map-add-line-layer.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function InitMap()
6868
map.events.add('ready', function () {
6969

7070
//Load the custom image icon into the map resources.
71-
map.imageSprite.add('arrow-icon', 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/1717245/purpleArrowRight.png').then(function () {
71+
map.imageSprite.add('arrow-icon', '/images/icons/purpleArrowRight.png').then(function () {
7272
//Create a data source and add it to the map.
7373
datasource = new atlas.source.DataSource();
7474
map.sources.add(datasource);
@@ -125,6 +125,9 @@ This code creates a map that appears as follows:
125125

126126
:::image type="content" source="./media/map-add-line-layer/add-symbols-along-a-line.png" lightbox="./media/map-add-line-layer/add-symbols-along-a-line.png" alt-text="A screenshot showing a line layer on an Azure Maps map with arrow symbols along the line.":::
127127

128+
> [!NOTE]
129+
> For a copy of the image file used in the above sample, see [purpleArrowRight.png](https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Static/images/icons/purpleArrowRight.png) in GitHub.
130+
128131
<!-----------------------------------------------------------------------
129132
> [!VIDEO //codepen.io/azuremaps/embed/drBJwX/?height=500&theme-id=0&default-tab=js,result&editable=true]
130133
----------------------------------------------------------------------->

articles/azure-maps/map-add-pin.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function InitMap()
125125
map.events.add('ready', function () {
126126

127127
//Load the custom image icon into the map resources.
128-
map.imageSprite.add('my-custom-icon', 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/1717245/showers.png').then(function () {
128+
map.imageSprite.add('my-custom-icon', '/images/icons/showers.png').then(function () {
129129

130130
//Create a data source and add it to the map.
131131
var datasource = new atlas.source.DataSource();
@@ -160,6 +160,9 @@ function InitMap()
160160

161161
:::image type="content" source="./media/map-add-pin/add-custom-icon-to-symbol-layer.png" alt-text="A screenshot of map with a pin added using the symbol layer with a custom icon.":::
162162

163+
> [!NOTE]
164+
> For a copy of the image file used in the above sample, see [showers.png](https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Static/images/icons/showers.png) in GitHub.
165+
163166
<!-------------------------------------------
164167
> [!VIDEO //codepen.io/azuremaps/embed/WYWRWZ/?height=500&theme-id=0&default-tab=js,result&embed-version=2&editable=true]
165168
------------------------------------->
-130 KB
Loading

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function InitMap()
6363
map.layers.add(layer);
6464

6565
//Load an initial data set.
66-
loadDataSet('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1717245/use-simple-data-layer.json');
66+
loadDataSet('{Your-Data-Source-File}');
6767

6868
function loadDataSet(url) {
6969
//Read the spatial data and add it to the map.
@@ -86,7 +86,7 @@ function InitMap()
8686
}
8787
```
8888

89-
The url passed to the `loadDataSet` function points to the following json:
89+
The _initial data set_ passed to the `loadDataSet` function in this example points to the following json:
9090

9191
```json
9292
{

articles/azure-maps/spatial-io-read-write-spatial-data.md

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -84,58 +84,57 @@ atlas.io.read('https://nonCorsDomain.example.com/mySuperCoolData.xml', {
8484
The following code snippet shows how to read a delimited file and render it on the map. In this case, the code uses a CSV file that has spatial data columns. You must add a reference to the Azure Maps Spatial IO module.
8585

8686
```javascript
87-
8887
<!-- Add reference to the Azure Maps Spatial IO module. -->
8988
<script src="https://atlas.microsoft.com/sdk/javascript/spatial/0/atlas-spatial.min.js"></script>
9089

91-
<script type="text/javascript">
92-
var map, datasource, layer;
93-
94-
//a URL pointing to the CSV file
95-
var delimitedFileUrl = "https://s3-us-west-2.amazonaws.com/s.cdpn.io/1717245/earthquakes_gt7_alltime.csv";
96-
97-
function InitMap()
98-
{
99-
map = new atlas.Map('myMap', {
100-
center: [-73.985708, 40.75773],
101-
zoom: 12,
102-
view: "Auto",
103-
104-
//Add authentication details for connecting to Azure Maps.
105-
authOptions: {
106-
// Get an Azure Maps key at https://azuremaps.com/.
107-
authType: 'subscriptionKey',
108-
subscriptionKey: '{Your-Azure-Maps-Subscription-key}'
109-
},
110-
});
111-
112-
//Wait until the map resources are ready.
113-
map.events.add('ready', function () {
114-
//Create a data source and add it to the map.
115-
datasource = new atlas.source.DataSource();
116-
map.sources.add(datasource);
117-
118-
//Add a simple data layer for rendering the data.
119-
layer = new atlas.layer.SimpleDataLayer(datasource);
120-
map.layers.add(layer);
121-
122-
//Read a CSV file from a URL or pass in a raw string.
123-
atlas.io.read(delimitedFileUrl).then(r => {
124-
if (r) {
125-
//Add the feature data to the data source.
126-
datasource.add(r);
127-
128-
//If bounding box information is known for data, set the map view to it.
129-
if (r.bbox) {
130-
map.setCamera({
131-
bounds: r.bbox,
132-
padding: 50
90+
<script>
91+
var datasource, delimitedFileUrl = "Chicago_Police_Stations.csv";
92+
// Download CSV file (delimitedFileUrl) from:
93+
// https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Static/data/SpatialCSV/Chicago_Police_Stations.csv
94+
95+
function GetMap() {
96+
97+
//Instantiate a map object
98+
var map = new atlas.Map("myMap", {
99+
center: [-87.628899, 41.874693],
100+
zoom: 9,
101+
view: "Auto",
102+
// Replace <Your Azure Maps Subscription Key> with your Azure Maps subscription key. https://aka.ms/am-primaryKey
103+
authOptions: {
104+
authType: 'subscriptionKey',
105+
subscriptionKey: '{Your-Azure-Maps-Subscription-key}'
106+
}
107+
});
108+
109+
//Wait until the map resources are ready.
110+
map.events.add('ready', function () {
111+
112+
//Create a data source and add it to the map.
113+
datasource = new atlas.source.DataSource();
114+
map.sources.add(datasource);
115+
116+
//Add a simple data layer for rendering the data.
117+
layer = new atlas.layer.SimpleDataLayer(datasource);
118+
map.layers.add(layer);
119+
120+
//Read a CSV file from a URL or pass in a raw string.
121+
atlas.io.read(delimitedFileUrl).then(r => {
122+
if (r) {
123+
124+
//Add the feature data to the data source.
125+
datasource.add(r);
126+
127+
//If bounding box information is known for data, set the map view to it.
128+
if (r.bbox) {
129+
map.setCamera({
130+
bounds: r.bbox,
131+
padding: 50
132+
});
133+
}
134+
}
135+
});
133136
});
134137
}
135-
}
136-
});
137-
});
138-
}
139138
</script>
140139
```
141140

0 commit comments

Comments
 (0)