sdi_copyrightviewer
This bundle provides a widget to display copyright information of the services in the map.
It has the widget role sdi_copyrightviewer
and is placed by default (in map.apps seasons template) in the mapview toolset.
Usage
Copyright information can be configured in the bundle. Additional copyright information from the service will be appended as well. See below for configuration instructions.
An external metadata link can be configured as well. The link will always open in a new browser tab.
Configuration Reference
Property | Type | Mandatory | Description |
---|---|---|---|
copyrightConfig |
Array of layers copyrights | no | An array of copyright infomation for layers. |
mapModelId |
Id of mapmodel node | no | Mapmodel Id of the defined layer. |
copyrightInfo |
Array of copyrights entries | no | An array of copyright infomation for a specific layer. |
metadata |
Link for externale metadata | no | A link for external metadata which will be opend in new browser tab. |
description |
Description of the service | no | the description of the service can be overritten here. It will appear in the widget. |
The following sample shows how this configuration is adjusted in the app.json:
"bundles": {
"sdi_copyrightviewer": {
"Config": {
"copyrightConfig": [
{
"mapModelId": "streets_wms",
"copyrightInfo":[
{
"title": "Access constraints",
"value": "Nobody get's access!!!"
},
{
"title": "Contact organization",
"value": "My organization"
},
{
"title": "Some title",
"value": "Some special text"
}
],
"metadata": {
"link": " http://www.conterra.de"
}
}
]
}
}
}
Display links and simple HTML
The following sample shows how to add HTML anchors per configuration in the app.json:
"bundles": {
"sdi_copyrightviewer": {
"Config": {
"copyrightConfig": [
{
"mapModelId": "streets_wms",
"copyrightInfo":[
{
"title": "A link",
"value": "Test <a href='https://conterra.de' target='_blank'>This is a clickable link that leads to a web page</a>"
}
],
"metadata": {
"link": " http://www.conterra.de"
}
}
]
}
}
}
This is implemented by using the v-html directive. v-html poses an XSS risk due to inline js. map.apps minimizes this by using a CSP HTTP header (Content Security Policy), which blocks unsafe inline scripts. Nevertheless, v-html should always be used with caution. As an admin function, however, the risk is again reduced.