Skip to content
Christian Latouche edited this page Apr 19, 2018 · 37 revisions

The Federal Geospatial Platform Viewer (FGPV) schema V. 2.3

The schema.json file can be found here

Services

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": ...
        }
    }
}

services

Name Type Description Default value Example Author section Advance Required
services object A set of service endpoints used by the viewer. Services - -

proxyUrl

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 -

exportMapUrl

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 -

geometryUrl

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 -

googleAPIKey

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 -

search

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 - -

search : serviceUrls

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 -

export

Name Type Description Default value Example Author section Advance Required
services : export object Export properties. Services/Export Map - -

export : title

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 - -

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 -

export : mapElements

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 - -

export : legend

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 - -

export : footnote

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 - -

export : timestamp

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 - -

back to Services top

Version

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"

Language

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"

Appendix

Services : proxyUrl

You can find more information about proxy services here.

    "services"{
        ...,
        "proxyUrl": "http://.../ProxyEndPoint",
        ...
    }

back to proxyUrl

Services : exportMapUrl

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.

download

back to exportMapUrl

Services : geometryUrl

You can find more information about the geometry services here.

    "services"{
        ...,
        "geometryUrl": "http://.../GeometryEndPoint",
        ...
    }

back to geometryUrl

Services : googleAPIKey

You can find more information about the google API Key service here.

    "services"{
        ...,
        "googleAPIKey": "AIzaSyBT6w4TvRdWFhFk35tc",
        ...
    }

back to googleAPIKey

Services : search

    "services"{
        ...,
        "search": {
            "disabledSearches": [...],
            "serviceUrls": {...}
        }
        ...
    }

Searches can be done through the search bar.

search

back to search

Services : search : disabledSearches

Be cautious, the types of search identified in the array will be enabled in the viewer.

        "search": {
            "disabledSearches": ["NTS","LAT/LNG"],
            ...
        }

back to search

Services : search : serviceUrls

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"
        },
        ...
    }

back to serviceUrls

Services : export

    "services"{
        ...,
        "export": {
            "title": {...},
            "map": {...},
            "mapElements": {...},
            "legend": {...},
            "footnote": {...},
            "timestamp": {...}
        },
        ...
    }

Accessing export dialog window

Access

Accessing the export settings can be done through the settings button Settings-buttons. 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".

Settings

back to export

Services : export : title

    "export": {
      ...,
      "title": {
        "isSelectable": true,
        "isSelected": true,
        "value": "Title"
      },
      ...
    }

title

back to title

Services : export : map

    "export": {
      ...,
      "map": {
        "isSelectable": true,
        "isSelected": true
      },
      ...
    }

map

back to map

Services : export : mapElements

    "export": {
      ...,
      "mapElements": {
        "isSelectable": true,
        "isSelected": true
      },
      ...
    }

mapElements

back to mapElements

Services : export : legend

    "export": {
      ...,
      "legend": {
        "isSelectable": true,
        "isSelected": true
      },
      ...
    }

legend

back to legend

Services : export : footnote

    "export": {
      ...,
      "footnote": {
        "isSelectable": true,
        "isSelected": true
      },
      ...
    }

footnote

back to footnote

Services : export : timestamp

    "export": {
      ...,
      "timestamp": {
        "isSelectable": true,
        "isSelected": false
      },
      ...
    }

timestamp

back to timestamp

Clone this wiki locally