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-ogc-map-layer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ manager: philmea
14
14
15
15
The `atlas.layer.OgcMapLayer` class can overlay Web Mapping Services (WMS) imagery and Web Mapping Tile Services (WMTS) imagery on the map. WMS is a standard protocol developed by OGC for serving georeferenced map images over the internet. Image georeferencing is the processes of associating an image to a geographical location. WMTS is also a standard protocol developed by OGC. It's designed for serving pre-rendered and georeferenced map tiles.
16
16
17
-
The following sections outline the Web Mapping Service features that are supported by the `OgcMapLayer` class.
17
+
The following sections outline the web mapping service features that are supported by the `OgcMapLayer` class.
Copy file name to clipboardExpand all lines: articles/azure-maps/spatial-io-add-simple-data-layer.md
+51-53Lines changed: 51 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,56 @@ In addition to styling features, the `SimpleDataLayer` provides a built-in popup
19
19
20
20
The `SimpleDataLayer` class is intended to be used on large data sets with many geometry types and many styles applied on the features. 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, use a core layer to render a couple of geometry types and a few styles on a feature
21
21
22
+
## Use a simple data layer
23
+
24
+
The `SimpleDataLayer` class is used like the other rendering layers are used. The code below shows how to use a simple data layer in a map:
25
+
26
+
```javascript
27
+
//Create a data source and add it to the map.
28
+
var datasource =newatlas.source.DataSource();
29
+
map.sources.add(datasource);
30
+
31
+
//Add a simple data layer for rendering data.
32
+
var layer =newatlas.layer.SimpleDataLayer(datasource);
33
+
map.layers.add(layer);
34
+
```
35
+
36
+
Add features to the data source. Then, the simple data layer will figure out how best to render the features. Styles for individual features can be set as properties on the feature. The following code shows a GeoJSON point feature with a `color` property set to `red`.
37
+
38
+
```json
39
+
{
40
+
"type": "Feature",
41
+
"geometry": {
42
+
"type": "Point",
43
+
"coordinates": [0, 0]
44
+
},
45
+
"properties": {
46
+
"color": "red"
47
+
}
48
+
}
49
+
```
50
+
51
+
The following code renders the above point feature using the simple data layer.
52
+
53
+
<br/>
54
+
55
+
<iframeheight="500"style="width: 100%;"scrolling="no"title="Use the Simple data layer"src="//codepen.io/azuremaps/embed/zYGzpQV/?height=500&theme-id=0&default-tab=js,result"frameborder="no"allowtransparency="true"allowfullscreen="true"> See the Pen <a href='https://codepen.io/azuremaps/pen/zYGzpQV/'>Use the simple data layer</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
56
+
</iframe>
57
+
58
+
The real power of the simple data layer comes when:
59
+
60
+
- There are several different types of features in a data source; or
61
+
- Features in the data set have several style properties individually set on them; or
62
+
- You're not sure what the data set exactly contains.
63
+
64
+
For example when parsing XML data feeds, you may not know the exact styles and geometry types of the features. The following sample shows the power of the simple data layer by rendering the features of a KML file. It also demonstrates various options that the simple data layer class provides.
65
+
66
+
<br/>
67
+
68
+
<iframeheight="700"style="width: 100%;"scrolling="no"title="Simple data layer options"src="//codepen.io/azuremaps/embed/gOpRXgy/?height=700&theme-id=0&default-tab=result"frameborder="no"allowtransparency="true"allowfullscreen="true"> See the Pen <a href='https://codepen.io/azuremaps/pen/gOpRXgy/'>Simple data layer options</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
69
+
</iframe>
70
+
71
+
22
72
## Default supported style properties
23
73
24
74
As mentioned earlier, the simple data layer wraps several of the core rendering layers: bubble, symbol, line, polygon, and extruded polygon. It then uses expressions to search for valid style properties on individual features.
@@ -27,9 +77,7 @@ Azure Maps and GitHub style properties are the two main sets of supported proper
27
77
28
78
If the reader encounters a less common style property, it will convert it to the closest Azure Maps style property. Additionally, the default style expressions can be overridden by using the `getLayers` function of the simple data layer and updating the options on any of the layers.
29
79
30
-
The next section provides details on the default style properties that are supported by the simple data layer. The order of the supported property name is also the priority of the property. If two style properties are defined for the same layer option, then the first one in the list has higher precedence.
31
-
32
-
## Simple data layer options
80
+
The following section provide details on the default style properties that are supported by the simple data layer. The order of the supported property name is also the priority of the property. If two style properties are defined for the same layer option, then the first one in the list has higher precedence.
33
81
34
82
### Bubble layer style properties
35
83
@@ -110,56 +158,6 @@ If the feature is a `Polygon` or a `MultiPolygon`, and has a `height` property w
110
158
|`fillColor`|`fillColor`, `fill`|`'#1E90FF'`|
111
159
|`height`|`height`|`0`|
112
160
113
-
## Use a simple data layer
114
-
115
-
The `SimpleDataLayer` class is used like the other rendering layers are used. The code below shows how to use a simple data layer in a map:
116
-
117
-
```javascript
118
-
//Create a data source and add it to the map.
119
-
var datasource =newatlas.source.DataSource();
120
-
map.sources.add(datasource);
121
-
122
-
//Add a simple data layer for rendering data.
123
-
var layer =newatlas.layer.SimpleDataLayer(datasource);
124
-
map.layers.add(layer);
125
-
```
126
-
127
-
Add features to the data source. Then, the simple data layer will figure out how best to render the features. Styles for individual features can be set as properties on the feature. The following code shows a GeoJSON point feature with a `color` property set to `red`.
128
-
129
-
```json
130
-
{
131
-
"type": "Feature",
132
-
"geometry": {
133
-
"type": "Point",
134
-
"coordinates": [0, 0]
135
-
},
136
-
"properties": {
137
-
"color": "red"
138
-
}
139
-
}
140
-
```
141
-
142
-
The following code renders the above point feature using the simple data layer.
143
-
144
-
<br/>
145
-
146
-
<iframeheight="500"style="width: 100%;"scrolling="no"title="Use the Simple data layer"src="//codepen.io/azuremaps/embed/zYGzpQV/?height=500&theme-id=0&default-tab=js,result"frameborder="no"allowtransparency="true"allowfullscreen="true"> See the Pen <a href='https://codepen.io/azuremaps/pen/zYGzpQV/'>Use the simple data layer</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
147
-
</iframe>
148
-
149
-
The real power of the simple data layer comes when:
150
-
151
-
- There are several different types of features in a data source; or
152
-
- Features in the data set have several style properties individually set on them; or
153
-
- You're not sure what the data set exactly contains.
154
-
155
-
For example when parsing XML data feeds, you may not know the exact styles and geometry types of the features. The following sample shows the power of the simple data layer by rendering the features of a KML file. It also demonstrates various options that the simple data layer class provides.
156
-
157
-
<br/>
158
-
159
-
<iframeheight="700"style="width: 100%;"scrolling="no"title="Simple data layer options"src="//codepen.io/azuremaps/embed/gOpRXgy/?height=700&theme-id=0&default-tab=result"frameborder="no"allowtransparency="true"allowfullscreen="true"> See the Pen <a href='https://codepen.io/azuremaps/pen/gOpRXgy/'>Simple data layer options</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
160
-
</iframe>
161
-
162
-
163
161
## Next steps
164
162
165
163
Learn more about the classes and methods used in this article:
Copy file name to clipboardExpand all lines: articles/azure-maps/spatial-io-connect-wfs-service.md
+2-20Lines changed: 2 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,32 +89,14 @@ The following code uses the WFS client to explore WFS services. Select a propert
89
89
<iframeheight='700'scrolling='no'title= 'WFS service explorer'src='//codepen.io/azuremaps/embed/bGdrvmG/?height=700&theme-id=0&default-tab=result&embed-version=2&editable=true'frameborder='no'allowtransparency='true'allowfullscreen='true'style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/bGdrvmG/'>WFS service explorer</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
90
90
</iframe>
91
91
92
-
You may also use a proxy service to load resources that are hosted on domains that aren't CORs enabled. You would first define a variable to hold the proxy service url and set the `proxyService` option for the WFS client. To render a proxy service option for the user, add a user input to the UI. Load the service url when the input is clicked. The following snippets show you how to use the proxy service.
92
+
To access WFS services hosted on non-CORs enabled enpoints, a CORs enabled proxy service can be passed into the `proxyService` option of the WFS client as shown below.
93
93
94
94
```JavaScript
95
-
96
-
//A variable to hold the URL of the proxy service
97
-
var proxyServiceUrl =window.location.origin+'CorsEnabledProxyService.ashx?url=';
98
-
99
95
//Create the WFS client to access the service and use the proxy service settings
Copy file name to clipboardExpand all lines: articles/azure-maps/spatial-io-core-operations.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,23 @@ By default, the reader will use the comma character as the delimiter. However, t
33
33
34
34
This reader also supports text qualifiers that are used to handle cells that contain the delimiter character. The quote (`'"'`) character is the default text qualifier, but it can be changed to any single character.
35
35
36
+
> [!NOTE]
37
+
> The delimited reader and writer functionality interprets column names that contain forward slashes "/" as property paths. This allows for complex JSON objects to be flattened into a two-dimensional table. If this is not your intention, download the file outside of the reader and replace the forward slash character with the escaped hex code `/` or html code `/`.
38
+
>
39
+
> ```JavaScript
40
+
>fetch('<URL to a delimited file to read>').then((response) => {
41
+
>returnresponse.text();
42
+
> }).then((data) => {
43
+
>//Replace all forward slash charcters with the escaped hex code "/" or html code "/"
The `atlas.io.core.CsvWriter` writes an array of objects as a delimited string. Any single character can be used as a delimiter or a text qualifier. The default delimiter is comma (`','`) and the default text qualifier is the quote (`'"'`) character.
Copy file name to clipboardExpand all lines: articles/azure-maps/spatial-io-read-write-spatial-data.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,17 +62,13 @@ The next code demo shows how to read and load KML, or KMZ, to the map. KML can c
62
62
<iframeheight='500'scrolling='no'title='Load KML Onto Map'src='//codepen.io/azuremaps/embed/XWbgwxX/?height=500&theme-id=0&default-tab=js,result&embed-version=2&editable=true'frameborder='no'allowtransparency='true'allowfullscreen='true'style='width: 100%;'>See the Pen <a href='https://codepen.io/azuremaps/pen/XWbgwxX/'>Load KML Onto Map</a> by Azure Maps (<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
63
63
</iframe>
64
64
65
-
You may optionally provide a proxy service for accessing cross domain assets that may not have CORs enabled. This snippet of code shows you could provide a proxy service:
65
+
You may optionally provide a proxy service for accessing cross domain assets that may not have CORs enabled. The read function will try to access files on another domain using CORs first. After the first time it fails to access any resource on another domain using CORs it will only request additional files if a proxy service has been provided. The read function appends the file URL to the end of the proxy URL provided. This snippet of code shows how to pass a proxy service into the read function:
66
66
67
67
```javascript
68
-
69
-
//Set the location of your proxyServiceUrl file
70
-
var proxyServiceUrl =window.location.origin+'/CorsEnabledProxyService.ashx?url=';
71
-
72
-
//Read a KML file from a URL or pass in a raw KML string.
Copy file name to clipboardExpand all lines: articles/azure-maps/spatial-io-supported-data-format-details.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -417,7 +417,7 @@ When scanning the header row, any type information that is in the column name wi
417
417
- edm.string
418
418
- varchar
419
419
- text
420
-
- case 'string
420
+
- string
421
421
422
422
If no type information can be extracted from the header, and the dynamic typing option is enabled when reading, then each cell will be individually analyzed to determine what data type it is best suited to be cast as.
0 commit comments