-
Notifications
You must be signed in to change notification settings - Fork 13
FGPV_schema_doc
The schema.json file can be found here
User Interface configuration
"ui": {
"fullscreen": ...,
"logoUrl": ...,
"title": ...,
"restrictNavigation": ...,
"failureFeedback": {
"failureMessage": ...,
"failureImageUrl": ...
},
"appBar": {
"sideMenu": ...,
"geoSearch": ...,
"basemap": ...,
"layers": ...
},
"navBar": {
"extra": ...
},
"sideMenu": {
"logo": ...,
"items": [ ]
},
"about": {
"content": ...,
OR
"folderName": ...
},
"help": {
"folderName": ...,
},
"legend": {
"reorderable": ...,
"allowImport": ...,
"isOpen": {
"large": ...,
"medium": ...,
"small": ...
}
},
"tableIsOpen": {
"id": ...,
"large": ...,
"medium": ...,
"small": ...
}
}| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui | object | User Interface configuration. | UI | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : fullscreen | boolean | Indicates viewer takes up entire viewport. | false |
false |
UI/General | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : logoUrl | string | An optional image to be used in the place of the default viewer logo. | - | "data:image/png;base64,image encoded" |
UI/Side Menu | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : title | string | An optional title to be used in the place of the default viewer title. | - | My custom title |
UI/Side Menu | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : restrictNavigation | boolean | Will restrict the user from panning beyond the maximum extent. | false |
false |
UI/Navigation | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : failureFeedback | object | Failure information. | UI/General | Yes | - | ||
| failureFeedback : failureMessage | string | An optional message to be used in place of the failure message | - | "That's a fail :-(" |
UI/General | Yes | - |
| failureFeedback : failureImageUrl | string | An optional image to be used in place of the failure Image. | - | "https://path2Image/MyFailureImage.gif" |
UI/General | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : appBar | object | Provides configuration to the main app toolbar. If not supplied, the default appbar controls are displayed. To completely hide the toolbar, provide the following: { sideMenu: false, geoSearch: false, layers: false }. | UI/Application Bar | - | - | ||
| appBar : sideMenu | boolean | Shows the side menu button in the main app toolbar. | true |
true |
UI/Application Bar | - | - |
| appBar : geoSearch | boolean | Shows the geosearch button in the main app toolbar. The button will be hidden if geosearch component is disabled or no search service URLs are provided. | true |
true |
UI/Application Bar | - | - |
| appBar : basemap | boolean | Shows the basemap selector button in the main app toolbar. | true |
true |
UI/Application Bar | - | - |
| appBar : layers | boolean | Shows the layers button in the main app toolbar. | true |
true |
UI/Application Bar | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : navBar | object | Provides configuration to the nav bar. If not supplied the default nav bar buttons are shown. | UI/Navigation | - | - | ||
| navBar : extra | array | Set visible navigation bar buttons. Possible values: "geoLocator", "home", "basemap", "help", "fullscreen", "geoSearch", "sideMenu", "layers" | ["fullscreen", "geoLocator", "home", "help"] |
["home", "help", "fullscreen", "geoSearch", "sideMenu", "layers"] |
UI/Navigation | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| ui : sideMenu | object | Specifies which options are available in the left side menu. | UI/Side Menu | - | - | ||
| sideMenu : logo | boolean | Indicates if the logo should be shown in the left side menu. | true |
true |
UI/Side Menu | Yes | - |
| sideMenu : items | array | Side Menu set of buttons. Divide the menu using array symbols []. Possible values are "layers", "basemap", "geoSearch", "about", "fullscreen", "export", "share", "touch", "help", "language", "plugins" | [["layers", "basemap"], ["fullscreen", "export", "share", "touch", "help", "about"], ["language"], ["plugins"]] |
[["layers", "basemap"], ["fullscreen", "export", "about"], ["language"]] |
UI/Side Menu | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| about | object | Specifies the location/content of the about section. | UI/Side Menu | - | - | ||
| about : content | string | The content of the about section. | - | "This is about about" |
UI/Side Menu | - | - |
| about : folderName | string | The folder which contains the content for the about section. | - | \aboutIsHere\ |
UI/Side Menu | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| help | object | Specifies details for the Help section. | UI/Side Menu | Yes | - | ||
| help : folderName | string | Help folder name which contains the help description and images. | \HelpIsHere\ |
UI/Side Menu | Yes | Yes |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| legend | object | Specifies options for the legend like reordering, importing, etc. | UI/General | - | - | ||
| legend : reorderable | boolean | Specifies if the items in the legend can be reordered; structured legend ignores this property. | true |
true |
UI/General | - | - |
| legend : allowImport | boolean | Specifies if the user-added layers are allowed. | true |
true |
UI/General | - | - |
| legend : isOpen | object | Specifies whether the legend is opened by default on initial loading of the map for small, medium, and large viewports. | UI/General | - | - | ||
| isOpen : large | boolean | Whether the legend is opened by default on initial loading of the map for large viewports. | false |
false |
UI/General | - | - |
| isOpen : medium | boolean | Whether the legend is opened by default on initial loading of the map for medium viewports. | false |
false |
UI/General | - | - |
| isOpen : small | boolean | Whether the legend is opened by default on initial loading of the map for small viewports. | false |
false |
UI/General | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| tableIsOpen | object | A set of service endpoints used by the viewer. | UI/General | Yes | - | ||
| id | string | The id of the layer for referencing within the viewer. | - | "mylayerID" |
UI/General | Yes | Yes |
| large | boolean | Whether the table panel is opened by default on initial loading of the map for large viewports. | false |
false |
UI/General | Yes | - |
| medium | boolean | Whether the table panel is opened by default on initial loading of the map for medium viewports. | false |
false |
UI/General | Yes | - |
| small | boolean | Whether the table panel is opened by default on initial loading of the map for small viewports. | false |
false |
UI/General | Yes | - |
A set of service endpoints used by the viewer.
"services": {
"proxyUrl": ...,
"exportMapUrl": ...,
"geometryUrl": ...,
"googleAPIKey": ...,
"search": {
"disabledSearches": [...],
"serviceUrls": {
"geoNames": ...,
"geoLocation": ...,
"geoSuggest": ...,
"provinces": ...,
"types": ...,
}
},
"export": {
"title": {
"isSelected": ...,
"isSelectable": ...,
"value": ...
},
"map": {
"isSelected": ...,
"isSelectable": ...
},
"mapElements": {
"isSelected": ...,
"isSelectable": ...
},
"legend": {
"isSelected": ...,
"isSelectable": ...
},
"footnote": {
"isSelected": ...,
"isSelectable": ...,
"value": ...
},
"timestamp": {
"isSelected": ...,
"isSelectable": ...
}
}
}| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services | object | A set of service endpoints used by the viewer. | Services | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : proxyUrl | string | 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. | "" |
"http://.../ProxyEndPoint" |
Services/Service End Points | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : exportMapUrl | string | 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. | "" |
"http://.../ExportMapEndPoint" |
Services/Service End Points | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : geometryUrl | string | A URL to an ESRI ArcGIS geometry service REST endpoint. | "" |
"http://.../GeometryEndPoint" |
Services/Service End Points | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : googleAPIKey | string | Google API key to enable geo location. | "" |
"AIzaSyBT6w4TvRdWFhFk35tc" |
Services/Service End Points | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : search | object | Search properties including ability to disable certain types of searches (NTS, FSA, and/or LAT/LNG) and to set service endpoint urls | Services/Geo Search | - | - | ||
| search : disabledSearches | array | Enable specific types of searches including: National Topographic System, Postal Code/Foward Sorting Area or Latitude/Longitude (e.g. 58.12;-100.67) | [] |
["NTS","LAT/LNG"] |
Services/Geo Search | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| search : serviceUrls | object | Service endpoint urls | Services/Geo Search | Yes | - | ||
| serviceUrls : geoLocation | string | Endpoint url for geoLocation service | "" |
"https://.../en/locate?q=" |
Services/Geo Search | Yes | - |
| serviceUrls : geoNames | string | Endpoint url for geoNames service | "" |
"https://.../en/geonames.json" |
Services/Geo Search | Yes | - |
| serviceUrls : geoSuggest | string | Endpoint url for geoSuggest service | "" |
"https://.../en/suggest?q=" |
Services/Geo Search | Yes | - |
| serviceUrls : provinces | string | Endpoint url for provinces service | "" |
"https://.../en/codes/province.json" |
Services/Geo Search | Yes | - |
| serviceUrls : types | string | Endpoint url for types service | "" |
"https://.../en/codes/concise.json" |
Services/Geo Search | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| services : export | object | Export properties. | Services/Export Map | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : title | object | Export title's properties. | Services/Export Map | - | - | ||
| 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 | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : map | object | Map component. | Services/Export Map | Yes | - | ||
| map : isSelectable | boolean | true |
true |
Services/Export Map | Yes | - | |
| map : isSelected | boolean | true |
true |
Services/Export Map | Yes | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : mapElements | object | North arrow and scalebar component. | Services/Export Map | - | - | ||
| mapElements : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
| mapElements : isSelected | boolean | true |
true |
Services/Export Map | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : legend | object | Legend component. | Services/Export Map | Yes | - | ||
| legend : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
| legend : isSelected | boolean | true |
true |
Services/Export Map | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : footnote | object | Foot notice to add to exported map. | Services/Export Map | Yes | - | ||
| 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 | - | - |
| Name | Type | Description | Default value | Example | Author section | Advance | Required |
|---|---|---|---|---|---|---|---|
| export : timestamp | object | Timestamp component. | Services/Export Map | - | - | ||
| timestamp : isSelectable | boolean | true |
true |
Services/Export Map | - | - | |
| timestamp : isSelected | boolean | true |
true |
Services/Export Map | - | - |
The schema version used to validate the configuration file. The schema should enumerate the list of versions accepted by this version of the viewer.
"version": "2.2"ISO 639-1 code indicating the language of strings in the schema file.
| ISO 639-1 code | Language | Default |
|---|---|---|
| "en" | English | Yes |
| "fr" | French |
"language": "en" "ui"{
...,
"fullscreen": true,
...
}Note: if you want your custom logo to be shown, you have to set "sideMenu" {"logo": true} (see sideMenu)
"ui"{
...,
"logoUrl": "data:image/png;base64,image encoded",
...
} "ui"{
...,
"title": "Custom title",
...
} "ui"{
...,
"restrictNavigation": true,
...
} "ui"{
...,
"failureFeedback": {
"failureMessage": "That's a fail :-(",
"failureImageUrl":"https://files.gitter.im/AleksueiR/eR5s/dinoscream.gif"
},
...
}
The application bar could be found at the top left corner of the viewer.
"ui"{
...,
"appBar": {
"sideMenu": true,
"geoSearch": true,
"basemap": true,
"layers": true
},
...
}Putting false to an element will hide it.
The application bar could be found at the bottom right corner of the viewer.
"ui"{
...,
"navBar": {
"extra": ["fullscreen", "geoLocator", "home", "help", "basemap", "geoSearch", "sideMenu", "layers"]
},
...
}You can find more information about proxy services here.
"services"{
...,
"proxyUrl": "http://.../ProxyEndPoint",
...
}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",
...
} "services"{
...,
"search": {
"disabledSearches": [...],
"serviceUrls": {...}
}
...
}Searches can be done through the search bar.
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 "geoSuggets"
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": "Title"
},
...
} "export": {
...,
"map": {
"isSelectable": true,
"isSelected": true
},
...
} "export": {
...,
"mapElements": {
"isSelectable": true,
"isSelected": true
},
...
} "export": {
...,
"legend": {
"isSelectable": true,
"isSelected": true
},
...
} "export": {
...,
"footnote": {
"isSelectable": true,
"isSelected": true
},
...
} "export": {
...,
"timestamp": {
"isSelectable": true,
"isSelected": false
},
...
}