Skip to main content

Configuration

This section lists all the configuration entries available in GeoGirafe, and how to configure them. The whole configuration is done in the config.json file.

Every configuration option that has no default value must be set properly to make the application work.

Basemaps

The list of basemaps available in the application is loaded from the themes.json file. In addition, you can use the basemaps section to configure additional options.

NameTypeDescriptionDefaultExamples
showBooleanDisplay the basemap control or not. If set to false, the basemap controller won't be visible in the application.truetrue, false
defaultBasemapStringName of the default basemap, that will be displayed when the application starts. This is the name of the background map available in themes.json.'Empty'background_color, swissimage
OSMBooleanEnable or disable OpenStreetMap as an additional basemap layer.falsetrue, false
SwissTopoVectorTilesBooleanEnable or disable the VectorTiles layer from Swisstopo as an additional basemap layer.falsetrue, false
emptyBasemapBooleanEnable or disable the an empty basemap.truetrue, false

Bookmarks

The bookmarks section contains the configuration options for saving the bookmarks. It the service type is server the bookmarks will be fetched and posted as JSON.

NameTypeDescriptionDefaultExamples
serviceStringType type of service being usedlocalStoragelocalStorage, server
getStringOptional URL that will be used to get the bookmarks if the service type is server-https://yourbackendserver.com/bookmarks
postStringOptional URL that will be used to save the bookmarks if the service type is server-https://yourbackendserver.com/bookmarks

CSV

The csv section contains the configuration options to format CSV file to download.

NameTypeDescriptionDefaultExamples
encodingStringThe encoding of the file.utf-8iso-8859-3
extensionStringThe extension of the file..csv.txt
includeHeaderBooleanInclude the header (columns titles).truefalse
quoteStringThe symbol to use to as simple quote.'"
separatorStringThe values separator.,;

Drawing

The drawing section contains the configuration options when drawing features on the map.

NameTypeDescriptionDefaultExamples
defaultFillColorStringDefault fill color used when drawing features on the map.#6666ff7fany color value in #RGBA format
defaultStrokeColorStringDefault stroke color used when drawing features on the map.#0000ffany color value in #RGBA format
defaultStrokeWidthNumberDefault stroke width used when drawing features on the map.2any integer
defaultTextSizeNumberDefault text size used when drawing features on the map.12any integer
defaultFontStringDefault font used when drawing features on the map.ArialArial, Tahoma, Verdana

General

The general section contains all the common configuration entries that can be used by any component.

NameTypeDescriptionDefaultExamples
localeStringLocale used when formatting numbers or dates in the application. For example this locale will be used to format the coordinates.en-USde-CH, fr-FR
logLevelStringLog level of the application. When defining a log level, all logs of this level and above will be displayed in the console. In development mode, the log level is forced to debug.warndebug, info, warn, error

Interface

The interface section contains the default settings for the layout and active component of the applications.

NameTypeDescriptionDefaultExamples
defaultSelectionComponentStringThe name of the selection component to be displayed per default. This can be window or 'grid', or another value if you have a custom plugin. The corresponding component must also exist in your HTML and script code.windowgrid

Languages

The languages section contains an option for each available language in the application plus other options is an Array of language.

NameTypeDescriptionDefaultExamples
translationsObjectAn object containing the list of available translations identified by their shortname. The corresponding value is an array of links to the JSON files containing the translations as value.-
"translations": {
  "de": ["de.json", "static/de.json"],
  "en": ["https://map.geo.bs.ch/static/X/en.json"],
  "fr": ["fr.json", "static/fr.json", "static/special_translations.json"]
}
defaultLanguageStringThe shortname of the default language that will be used when the application starts.-en, fr, de

Lidar

The lidar section contains the configuration options for the LIDAR profile.

NameTypeDescriptionDefaultExamples
urlStringLink to a pytree service with LIDAR data and configuration.-https://sitn.ne.ch/pytree

Map

The map section contains the configuration of the OpenLayers map.

NameTypeDescriptionDefaultExamples
sridStringDefault SRID of the map.-EPSG:2056
scalesArrayArray of scales allowed on the map.-[200000, 75000, 40000, 20000, 10000, 7500, 5000, 3500, 2000, 1000, 500, 200, 100, 50]
startPositionStringInitial center position when the application starts.-2611000,1267000
startZoomIntegerInitial zoom level when the application starts.-any valid integer for the map zoom level
maxExtentStringMaximum extent for the map. If not set, the map cover the entire world.-2583000,1235000,2650000,1291000
constrainScalesBooleanIf true, the map will only be allowed to used the specific scales defined in maps.scales.
If false, any scale is allowed.
truetrue, false
showScaleLineBooleanShow scale line on the map, or not.truetrue, false

Map3D

The map3d section contains the configuration of the Cesium globe.

NameTypeDescriptionDefaultExamples
terrainUrlStringURL for the 3D map terrain.-https://terrain100.geo.admin.ch/1.0.0/ch.swisstopo.terrain.3d/
terrainImageryObjectSee below--
terrainImagery.urlStringThe URL of your imagery provider (WMTS in your case), with template parameters as described in the Cesium documentation.-https://wmts20.geo.admin.ch/1.0.0/ch.swisstopo.swissimage-product/default/current/4326/{z}/{x}/{y}.jpeg
terrainImagery.sridIntegerThe SRID of the service used for terrainImagery. Only 4326 and 3857 are supported.43264326, 3857
terrainImagery.minLoDIntegerThe minimal level-of-detail that the imagery provider supports, if not mentioned, when zooming very far, the map may try to load nonexistent tiles that cause network error.-any integer that represents a valid level-of-details
terrainImagery.maxLoDIntegerSame as minLoD but for maximal level-of-detail, to prevent loading nonexistent tiles when zooming very close.-any integer that represents a valid level-of-details
terrainImagery.coverageAreaArrayThe rectangle, in degree, that describe the area provided by your WMTS. This parameter prevents requesting tiles that do not exist on the WMTS.-[5.013926957923385, 45.35600133779394, 11.477436312994008, 48.27502358353741]
tilesetsUrlsArrayArray of URLs for 3D map tilesets.-["https://3d.geo.bs.ch/static/tiles/a57b8783-1d7b-4ca9-b652-d4ead5436ead_2/tileset.json"]

Metadata

The metadata section contains the configuration options for the Metadata window.

NameTypeDescriptionDefaultExamples
metadataUrlPrefixStringURL Prefix to use when accessing metadata links, if there are defined with relative paths in themes.json.''https://map.geo.bs.ch
defaultWindowWidthStringDefault width of the metadata window, in CSS units.960px500px, 20rem
defaultWindowHeightStringDefault height of the metadata window, in CSS units.460px350px, 10rem

Offline

The offline section contains the configuration for the offline usage of GeoGirafe.

NameTypeDescriptionDefaultExamples
downloadStartZoomNumberThe number of the zoom level from which downloading tiles for usage in offline mode will be allowed.-any number corresponding to a valid zoom level
downloadEndZoomNumberThe zoom level to which tiles will be downloaded for an usage in offline mode.-any number corresponding to a valid zoom level

Print

The print section contains the configuration options for the print.

NameTypeDescriptionDefaultExamples
urlStringLink to the GeoMapFish-Compliant Print Service.-https://map.geo.bs.ch/printproxy/
formatsString[]The desired print formats. The provided format must be supported by MapFishPrint. The order is kept in the dropdown.["png", "pdf"]["png", "pdf", "jpg"]
defaultFormatStringThe print format selected by default. Only used if listed in formats and supported by MapFishPrint.-"pdf"
layoutsString[]A list of allowed layouts name. If configured, the layouts will be filtered using this value.-["1 A4 portrait", "2 A3 landscape"]
defaultLayoutStringThe print layout selected by default. Only used if the name match a layout.-"1 A4 portrait"
scalesNumberA list of allowed scales for every layouts. If configured, the scales will be filtered using this value.-[50000, 25000, 10000, 2500, 1000]
attributeNamesStringThe print attributes (optional fields) to display as inputs in the panel. The order is kept in the panel.-["legend", "title", "comments"]
legendObjectThe options for the print legend. See below.--
legend.useExtentbooleanUse or not the bbox to get the WMS legend. For QGIS server only.truefalse
legend.showGroupsTitlebooleanDisplay or not groups title in the legend. Switching to false is useful to obtains a "flat" legend.truefalse
legend.labelObject<string, boolean>The key is the server type (MapServer, QGIS, etc.), if the value is false the name of the layer will be not displayed. This is used to avoid duplicated title, as text and in the legend image.-{"mapserver": false}
legend.paramsObject<string, <Object<string, unknown>>The key is the server type (MapServer, QGIS, etc.) or image for an URL from a metadata. The value is some additional parameters set in the query string.-{"mapserver": {"filter": "house"}}

Projections

The projections section contains the list of projection that are available in the application.

NameTypeDescriptionDefaultExamples
projectionsStringAn array containing the list of EPSG coordinate systems with their name.-
"projections": {
"EPSG:3857": "W-M",
"EPSG:4326": "WGS84",
"EPSG:2056": "LV95"
}

Query

The query section contains the configuration options for the query result window.

NameTypeDescriptionDefaultExamples
legacyBooleanAllow less restricted parsing of query result value, allowing some JavaScript events to be whitelisted.
Currently supports:
- onclick
falsetrue

The search section contains the configuration options for the search.

NameTypeDescriptionDefaultExamples
urlStringLink to the GeoMapFish-Compliant Search Service. This service has to be compatible with the format of the GeoMapFish Search-Service. The link should contain the following strings:
- ###SEARCHTERM###: will be replaced by the text to search.
- ###SEARCHLANG###: will be replaced by the search language.
-https://map.geo.bs.ch/search?limit=90&partitionlimit=15&interface=desktop&query=###SEARCHTERM###&lang=###SEARCHLANG###
objectPreviewbooleanActivate or not the object preview on the map when navigating through the search results.falsetrue, false
layerPreviewbooleanActivate or not the layer preview on the map when navigating through the search results.falsetrue, false
minResolutionnumberConfigure the minimum resolution to zoom to when searching for an object. Is the object is very small (a point for example), the zoom will stop to this resolution.0.5any number
defaultFillColorStringDefine the default fill color of the polygon features of the search results.#3388ff7f-
defaultStrokeColorStringDefine the default stroke color of the line and polygon features of the search results.#3388ff-
defaultStrokeWidthnumberDefine the default stroke width of the line and polygon features of the search results.2any number
paintSearchResultsbooleanConfigure if the user can choose the color of the search results in the user interface.truetrue, false

Selection

The selection section contains the configuration options for the selected/focused features on the map.

NameTypeDescriptionDefaultExamples
maxFeatureIntegerLimit of requested object for every single WFS request.300100
defaultFillColorStringDefault fill color used when selecting an object in the map.#ff66667fany color value in #RGBA format
defaultStrokeColorStringDefault stroke color used when selecting an object in the map.#ff3333any color value in #RGBA format
defaultStrokeWidthIntegerDefault stroke width used when selecting an object in the map.4any integer
defaultFocusFillColorStringDefault fill color used when focusing an object in the map.#ff33337fany color value in #RGBA format
defaultFocusStrokeColorStringDefault stroke color used when focusing an object in the map.#ff0000any color value in #RGBA format
defaultFocusStrokeWidthIntegerDefault stroke width used when focusing an object in the map.4any integer

Share

The share section contains the configuration options for the short links.

NameTypeDescriptionDefaultExamples
serviceStringType of ShortUrl service we want to use. Supported configuration are:
- gmf: the GeoMapFish backend shortUrl service will be used.
- lstu: the open-source service Let's Shorten That URL will be used.
gmfgmf, lstu
createUrlStringThe URL that will be used to create the shortUrl.-https://lstu.fr/a

Themes

The themes section contains the configuration options linked to the themes.

NameTypeDescriptionDefaultExamples
urlStringLink to the GeoMapFish-Compliant themes.json-Mock/themes.json, https://map.geo.bs.ch/themes?background=background&interface=desktop
defaultThemeStringName of the default theme, that will be automatically loaded on application start.''main, cadastre
imagesUrlPrefixStringURL Prefix to use when accessing themes images, if there are defined with relative paths in themes.json.''https://map.geo.ti.ch
showErrorsOnStartBooleanIf true, the errors listed in themes.json will be displayed when the application starts. If false, they won't be displayed.falsetrue, false
selectionModeStringIf replace, only one theme can be active at the same time, and during the selection of a new theme the current theme is replaced. If add, many themes can be active at the same time, and selecting a new theme adds it at the beginning of the tree view.replacereplace, add

Treeview

The treeview section contains the configuration options for the layertree.

NameTypeDescriptionDefaultExamples
useLegendIconsBoolean If true, legend icon will be used in the treeview instead of the bullet, if any is defined in the metadata of the layer in the themes.json file. If false, the legend icons won't be used.falsetrue, false
hideLegendWhenLayerIsDeactivatedBooleanIf true, the legend of a layer will automatically be hidden if the layer is not activated. If false, the legend will remain visible even if the layer is deactivated.truetrue, false
defaultIconSizeObjectIf useLegendIcons has been set to true, the size of the legend icons can be configured here with the width and height properties.--
defaultIconSize.widthIntegerWidth of the icon that will be used for legend icons20any integer
defaultIconSize.heightHeightWidth of the icon that will be used for legend icons20any integer

Oauth

The oauth section is optional and contains configuration options for Oauth Open ID connect (OIDC) authentication. In this model, the user is redirected to an issuer to prove his identity, redirecting back to geogirafe with a token. Geogirafe then sends this token to log in to GeoMapFish. This implementation should support any generic OIDC issuer. As of this writing (22.9.2024), on the GeoMapFish side, it supports the custom Keycloak-GeoMapFish backend used by Basel-Stadt.

NameTypeDescriptionDefaultExamples
issuerObject
issuer.urlStringURL for the OIDC issuer's authorization endpoint.-https://auth.geo.test.bs.ch/auth/realms/geobs
issuer.clientIdStringClient Identifier of the GeoMapFish client application.-MapBS-ui
issuer.redirectUrlStringURL of the webpage the issuer should redirect to once login is done.-https://app.localhost:8080, https://demo.geomapfish.dev/mapbs/
issuer.algorithmStringOIDC algorithm oauth should use. Possible values: oidc, oauth2oidcoidc, oauth2
issuer.checkSessionOnLoadBooleanWhether geogirafe should immediately check on page load whether the user is connected to the issuer (implies back and forth redirects to the issuer and geogirafe).falsetrue, false
geomapfishObject
geomapfish.loginUrlStringURL to send the issuer's token to login to GeoMapFish-Keycloak.-https://map.geo.test.bs.ch/KeycloakLogin
geomapfish.logoutUrlStringURL to end the session on GeoMapFish-Keycloak (note: doesn't end the issuer's session).-https://map.geo.test.bs.ch/KeycloakLogout
geomapfish.userInfoUrlStringURL to get user's details from GeoMapFish-Keycloak.-https://map.geo.test.bs.ch/loginuser
geomapfish.anonymousUsernameStringHitting the geomapfish.userInfoUrl endpoint when unlogged yields an anonymous user with a username. the anonymousUsername is used to check whether the user is unlogged on Geomapfish-Keycloak.-service-account-service_mapbs_anonymous