-
Notifications
You must be signed in to change notification settings - Fork 14
Services
A set of service endpoints used by the viewer.
"services": {
"proxyUrl": ...,
"corsEverywhere": ...,
"exportMapUrl": ...,
"geometryUrl": ...,
"googleAPIKey": ...,
"esriLibUrl": ...,
"search": {
"settings": {
"categories": ...,
"sortOrder": ...,
"maxResults": ...,
"officialOnly": ...,
}
"disabledSearches": [...],
"serviceUrls": {
"geoNames": ...,
"geoLocation": ...,
"geoSuggest": ...,
"provinces": ...,
"types": ...,
}
},
"export": {
"title": {
"isSelected": ...,
"isSelectable": ...,
"value": ...
},
"map": {
"isSelected": ...,
"isSelectable": ...
},
"mapElements": {
"isSelected": ...,
"isSelectable": ...
},
"legend": {
"isSelected": ...,
"isSelectable": ...
"showInfoSymbology": ...
"showControlledSymbology": ...
"columnWidth": ...
},
"footnote": {
"isSelected": ...,
"isSelectable": ...
"value": ...
},
"timestamp": {
"isSelected": ...,
"isSelectable": ...
}
"timeout": ...
"cleanCanvas": ...
}
}
A set of service endpoints used by the viewer.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
object | Services | - | - |
An optional proxy to be used for dealing with same-origin issues. URL must either be a relative path on the same server or an absolute path on a server which sets CORS headers.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"http://.../ProxyEndPoint" |
Services/Service End Points | Yes | - |
A boolean indicating that all services are CORS enabled. This is mutually exclusive with proxyUrl..
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
boolean | false |
`` | Services/Service End Points | Yes | - |
An ESRI service endpoint for generating map images. Should point directly to an endpoint that can be consumed by ESRI PrintTask. NOTE: The PrintTask service has to be asynchronous.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"http://.../ExportMapEndPoint" |
Services/Service End Points | Yes | - |
A URL to an ESRI ArcGIS geometry service REST endpoint.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"http://.../GeometryEndPoint" |
Services/Service End Points | Yes | - |
Google API key to enable geo location.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"AIzaSyBT6w4TvRdWFhFk35tc" |
Services/Service End Points | Yes | - |
ESRI JavaSCript API endpoint. Note, we can't use a version greater than v3.22.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"http://..." |
Services/Service End Points | Yes | - |
Search properties including ability to disable certain types of searches (NTS, FSA, and/or LAT/LNG) and to set service endpoint urls.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
object | Services/Geo Search | - | - |
Configuration settings related to GeoSearch.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
object | Services/Geo Search | Yes | - |
Filter the search results based on the type of the geographical names. Allowed values can be found here (if using the Canadian GeoNames Search Service API): http://geogratis.gc.ca/services/geoname/en/codes/concise.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
array | [] |
['cities'] |
Services/Geo Search | Yes | - |
The sort order of the defined 'categories'. Any missing categories are appended to the bottom of the sorted list. The results can still be sorted through this option even if there are no categories being filtered.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
array | [] |
['cities'] |
Services/Geo Search | Yes | - |
The maximum number of results to return per request. The Canadian GeoNames Search Service API has a 1000 search limit which will be used as an upper limit of results returned unless another service is being used with a higher limit. The default is 100 results.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
integer | 100 |
100 |
Services/Geo Search | Yes | - |
Whether to return only official names for the geographic names. Default is false which will return both official names and formerly official names.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
boolean | false |
false |
Services/Geo Search | Yes | - |
Enable specific types of searches including: National Topographic System, Postal Code/Foward Sorting Area or Latitude/Longitude (e.g. 58.12;-100.67).
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
array | [] |
["NTS","LAT/LNG"] |
Services/Geo Search | - | - |
Service endpoint urls.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
object | Services/Geo Search | Yes | - |
Endpoint url for geoLocation service.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"https://.../en/locate?q=" |
Services/Geo Search | Yes | - |
Endpoint url for geoNames service.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"https://.../en/geonames.json" |
Services/Geo Search | Yes | - |
Endpoint url for geoSuggest service.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"https://.../en/suggest?q=" |
Services/Geo Search | Yes | - |
Endpoint url for provinces service
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"https://.../en/codes/province.json" |
Services/Geo Search | Yes | - |
Endpoint url for types service.
Type | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|
string | "" |
"https://.../en/codes/concise.json" |
Services/Geo Search | Yes | - |
Export properties.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | - | - |
Export title's properties.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | - | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
title : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
title : isSelected | boolean | true |
true |
Services/Export Map | - | - | |
title : value | string | Value to appear by default | "" |
"My map title" |
Services/Export Map | - | - |
Map component.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | Yes | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
map : isSelectable | boolean | true |
true |
Services/Export Map | Yes | - | |
map : isSelected | boolean | true |
true |
Services/Export Map | Yes | - |
North arrow and scalebar component.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
mapElements : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
mapElements : isSelected | boolean | true |
true |
Services/Export Map | - | - |
Legend component.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | Yes | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
legend : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
legend : isSelected | boolean | true |
true |
Services/Export Map | - | - | |
legend : showInfoSymbology | boolean | false |
true |
Services/Export Map | - | - | |
legend : showControlledSymbology | boolean | false |
true |
Services/Export Map | - | - | |
legend : columnWidth | integer | 350 |
true |
Services/Export Map | - | - |
Foot notice to add to exported map.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | Yes | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
footnote : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
footnote : isSelected | boolean | true |
true |
Services/Export Map | - | - | |
footnote : value | string | Footnote value to appear by default | "" |
"This is a foot notice" |
Services/Export Map | - | - |
Timestamp component.
Type | Author section | Advance | Required |
---|---|---|---|
object | Services/Export Map | - | - |
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
timestamp : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
timestamp : isSelected | boolean | true |
true |
Services/Export Map | - | - |
A timeout delay in milliseconds after which the export image generation is considered to have failed. Defaults to 120sec.
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
timeout | integer | 120 |
true |
Services/Export Map | - | - |
If set to true the export will omit layers and images that would cause issues with saving. If set to false users may need to save by right-clicking and selecting save image.
Name | Type | Description | Default value | Example | Author section | Advance | Required |
---|---|---|---|---|---|---|---|
cleanCanvas | boolean | false |
true |
Services/Export Map | - | - |
You can find more information about proxy services here.
"services"{
...,
"proxyUrl": "http://.../ProxyEndPoint",
...
}
"services"{
...,
"corsEverywhere": false,
...
}
You can find more information about exporting map to image services here.
"services"{
...,
"exportMapUrl": "http://.../ExportMapEndPoint",
...
}
This service is used when you push the DOWNLOAD button of the export dialog window.
You can find more information about the geometry services here.
"services"{
...,
"geometryUrl": "http://.../GeometryEndPoint",
...
}
You can find more information about the google API Key service here.
"services"{
...,
"googleAPIKey": "AIzaSyBT6w4TvRdWFhFk35tc",
...
}
SRI JavaSCript API endpoint. Note, we can't use a version greater than v3.22.
"services"{
...,
"esriLibUrl": "http://...",
...
}
"services"{
...,
"search": {
"settings": [...],
"disabledSearches": [...],
"serviceUrls": {...}
}
...
}
Searches can be done through the search bar.
Configuration settings related to GeoSearch.
"search": {
"settings":{
"categories":"['cities']",
"sortOrder":"['province', 'cities']",
"maxResult":"100",
"officialOnly":"true"
},
...
}
Be cautious, the types of search identified in the array will be enabled in the viewer.
"search": {
"disabledSearches": ["NTS","LAT/LNG"],
...
}
Default search services are provided by Natural Resources Canada and cover Canadian territories. You can find more information about thoses services here:
GeoLocation API: "geoLocation" and "geoSuggest"
GeoNames API: "geoNames", "provinces" and "types"
"search": {
"serviceUrls":{
"geoNames":"https://geogratis.gc.ca/services/geoname/en/geonames.json",
"geoLocation":"https://geogratis.gc.ca/services/geolocation/en/locate?q=",
"geoSuggest":"https://geogratis.gc.ca/services/geolocation/en/suggest?q=",
"provinces":"https://geogratis.gc.ca/services/geoname/en/codes/province.json",
"types":"https://geogratis.gc.ca/services/geoname/en/codes/concise.json"
},
...
}
"services"{
...,
"export": {
"title": {...},
"map": {...},
"mapElements": {...},
"legend": {...},
"footnote": {...},
"timestamp": {...}
},
...
}
Accessing export dialog window
Accessing the export settings can be done through the settings button . Each element of the settings panel can be selected or not by setting the attribute "isSelected" and show or hide in the panel with the use of "isSelectable".
"export": {
...,
"title": {
"isSelectable": true,
"isSelected": true,
"value": "Export custom title"
},
...
}
"export": {
...,
"map": {
"isSelectable": true,
"isSelected": true
},
...
}
"export": {
...,
"mapElements": {
"isSelectable": true,
"isSelected": true
},
...
}
"export": {
...,
"legend": {
"isSelectable": true,
"isSelected": true,
"showInfoSymbology": false,
"showControlledSymbology": false,
"columnWidth": 350
},
...
}
"export": {
...,
"footnote": {
"isSelectable": true,
"isSelected": true,
"value": "This a footnote from the configuration file."
},
...
}
"export": {
...,
"timestamp": {
"isSelectable": true,
"isSelected": false
},
...
}
"export": {
...,
"timeout": 120,
...
}
"export": {
...,
"cleanCanvas": false,
...
}