All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to CalVer.
- New option for setting the zoom-level of custom searches. default is level 18. The value can be set in the config, using the key
zoom
:
{
"searchConfig": {
"size": 4,
"komkode": "*",
"esrSearchActive": true,
"sfeSearchActive": true,
"extraSearches": [{
"name": "stednavne_search",
"db": "dk",
"host": "https://dk.gc2.io",
"heading": "Stednavne",
"zoom": 20,
"index": {
"name": "stednavne/navne_samlet",
"field": "string",
"key": "gid"
},
"relation": {
"name": "stednavne.navne_samlet_geom",
"key": "gid",
"geom": "the_geom"
}
}]
}
}
- Bug in editor caused layers with restrictions to be output as textareas. Now the editor will correctly output a select with the values setup in GC2.
- On mobile, it was possible for the menu to get into a stuck transparent state. This has been fixed.
- A bug caused the defaults not to load in the
conflictSearch
module. This has been fixed. - Attributions and zoom-settings are now correctly passed onto WMTS layers.
- Editor now handles JSON fields, which before rendered an syntax error in the decoding.
- Themes selector in default template. Choose between Dark, Light or Auto. Is set to the same theme as the OS (if supported). Auto will change the theme according to the OS.
- It's now possible to set up MapLibre layers as base layers (overlays will come later). Setup like this:
{
"type": "MVT",
"url": "https://api.maptiler.com/maps/topo/style.json?key=xxx",
"id": "mvt",
"name": "Open Street Map (Vektor)",
"description": "Kort fra mvt",
"attribution": "mvt",
"minZoom": 8,
"maxZoom": 20,
"maxNativeZoom": 19
}
- Also WMTS layer support is added for base layers:
{
"type": "WMTS",
"url": "https://api.dataforsyningen.dk/orto_foraar_webm_DAF?token=xxx&",
"tileMatrixSet": 'DFD_GoogleMapsCompatible',
"layer": 'orto_foraar_webm',
"id": "wmts",
"name": "Ortofoto (wmts)",
"description": "Kort fra wmts",
"attribution": "wmts",
"minZoom": 8,
"maxZoom": 20,
"maxNativeZoom": 19
}
- Leaflet is updated to latest: 1.9.4
- Symbols (Symbol extension) is now up-scaled in print to counter the down-scale of the actual map.
- Fixed issue with JSON types in Editor.
- Session cookies set through the URL is now Secure and sameSite: none.
- Conflict search module: Non ascii characters in SELECT statements caused a low level un-catchable error. Now statements are base64url encoded.
- Incorporated handling for
text
type fields with a newtextarea
UI widget in Editor. - Updated the js/embed.js script to handle 'data-vidi-title' attribute, which will set the 'title' attribute for iframes.
- Remove Polyfill.js from Service Worker cache
- Fixes in Conflict search: If response from GC2 is not JSON, the search will proceed and the raw body text is shown in errors dialog.
- Group check boxes now works with vector layers.
- Reverse sorting in groups. This was a regression from last version.
- Multi select tag widgets will now close on blur.
- The config
showOffcanvas
now has a third option"mobile"
(besidestrue
andfalse
), which means that the off canvas menu is only shown if the screen is wider than 720px.
- Huge performance increase in the layer switcher. Switching a layer on now takes ~20ms comparing to ~500ms before. This is gained by caching the cloned metadata object during a single event.
- Layers are removed from the Leaflet layer control when turned off. Turning on/off a lot of layers could hog down performance before.
infoCallback
andemptyInfoCallback
can be used in configs. The value should be a stringified function. The former callback is fired when feature info hits and an array of layers with hits is passed to the callback. The latter callback is fired when feature info hits nothing.
{
"infoCallback": "function(layers){console.log('You hit:', layers)}"
}
{
"emptyInfoCallback": "function(){console.log('You hit nothing')}"
}
- The parameter
config=...
is added to WMS url, so better analytics can be performed on the usages of configs and layers. - A new api method
api.turOff('schema.layer')
which turns the passed layer off.
- The snapshot tag list is now sorted alphanumeric.
- Hits in accordion popup are now sorted according to layer 'sort id'.
- A class attribute
vidi-draw-tooltip
is added to the label tool in Draw. This kan be used to change the style of the content in e.g. print.
- UTFgrids are now requested with filter, so mouseover doesn't catch filtered features (require GC2 2024.6.1 or later).
- The dropdown menu (three vertical dots) now aligned to left.
- Layer group checkboxes now reflects the state of the layer tree. An indeterminate state is shown when some layer but not all are active in a group.
- Support for 'data-vidi-schemata' attribute in embedded maps. When this attribute is set to a schemata text string, auto retrieval of matching layers alongside any specified in the config is enabled.
- Display filter for snapshots. Free test filtering of snapshots titles, so it becomes easier to manage long lists of snapshots
- Tagging system for snapshots. A snapshot can be tagged and used for filtering snapshots.
- New native API for getting configs from GC2 instead of using the requestProxy API.
- Module title is now set for extensions.
- Added the
dfi
url parameter, which if set, will disable fast init regardless other evaluated parameters. - Set the default boolean property to false in the extensions/editor/browser/index.js. This pertains to user interface properties where a checkbox is either checked or unchecked.
- The polyfill script for IE compatibility was removed from the index.html.default file.
- The repetitive code in Gruntfile.js related to browserify options and transformations have been extracted to constants.
- New config option
themes
, which will set the Bootstrap theme.light
anddark
are build in and custom ones can be added to/scss/themes.scss
.
- The entire GUI is rewritten in Bootstrap 5.3.
- New startup modal with config-switcher, which will show if Vidi is started with database in URL.
- A lot!
- Small fix to conflict.tmpl
- Errors in conflict module will now be shown on reports.
- Bug in ConflictSearch when stateless mode is enabled.
- Bug: The GC2 Open tools meta setting didn't work after tools were moved into at collapsable element.
- Regression bug: Zoom to default extent when using a state didn't zoom to state extent but to config extent.
- Use "geography" distance when doing feature info on points and lines stored in EPSG:4326. Otherwise the distance will be in degrees and capture anything inside the map extent.
- New config option
title
which will set the HTML document title. The title is set dynamically after Vidi has started and therefore the title will be set to the standard text for a moment during start-up.
- Update to new Skråfoto viewer in Streetview module.
- Cookie set in URL are now set with Expires. Also code moved from init.js to extensions/session.
- Redesign of layer element in layer tree. Extensive use of flex-boxes.
- Merge of WebGL layer branch.
- Removed Jsts as a dependency. Now using Turf in
advancedInfo
andconflict
. - Upgrade of Grunt.
- Upgrade to bullseye in Dockerfile.
- Bug in
conflict
module after change to native range input slider.
- Changed from noUiSlider to native HTML range input in these modules. noUiSlider packages is no longer installed:
- Base layers
- Advanced info
- Conflict
- jQuery upgraded to 3.6.1
- Reworked editor tools in popups. Now a central listner in the Editor module will invoke editing. Vector and raster now use the same markup definition for the editor tools.
- Editing can now be invoked from the accordion popup.
- The editor geometry for raster is now blue.
- The same marker is now used for both editing and adding points.
- Geometry from Draw module is no longer dashed when selected.
- The url parameter
dps=1
will prevent browser state from being pushed to history. This parameter will be set by embed.js, so the browser history will not be pushed to the parent frame. Snapshot links will also have this parameter set. - A new faster init process is implemented which cuts about 50% of startup time for Vidi. This new init process will automatic be invoked unless a URL achor is used - when the old process will be invoked.
- When using
crossMultiSelect
the geometry for the open accordion panel will now get the 'selected' style. - When using
featureInfoTableOnMap
the Back button will reset the 'selected' style. - When clicking/tapping on the map, geometry with 'selected' style will be reset if any.
- Update the editor queue statistics when group panel is opened in case of the layer tree component is not rendered yet. Before the queue statistics was not shown after a refresh.
- Click on set default extent button will now set initZoomCenter if present.
- It's now possible to use WMS overlays in base layer definitions. Before is was only possible to use GC2 layers for this.
- Komkode filter on esr/sfe search.
- Session cookie is now set with an
Expires
attribute, which can be set inconfig/config.js
. Before it was set as a non-persistent cookie, which was deleted on exiting the web browser. Defaults to 86400 seconds.
{
"sessionMaxAge": 86400
}
- When Vidi was started with URL layers in offline mode, the layers was not set to offline because the layertree was yet not created. Now offline mode is retrived form state on upstart.
- New config option added
popupDraggable
. Makes feature-info popups draggable. Can be set in run-tim config.
{
"popupDraggable": true
}
- Geometry created by feature-info module now stick after the module is swtiched off. So now it's possible to print maps with feature-info results. To clear the map the "Clear map" tool button can be used.
- A sort-by-score mode is added to Danish search module. The setting will sort the address list by a calculated score, so most relavant suggestions will be a the top. If switched off the list will be sorted alphanumeric. For now only works for address not cadastre.
{
"searchConfig": {
"komkode": "*",
"sortByScore": true
}
}
- The url parameter
initialFilter
must now be Base64URL encoded, which is safe to use in urls. If filter can't be decoded a alert will tell the user. https://base64.guru/standards/base64url
- In addition to the embed attributes
data-vidi-search
anddata-vidi-history
some more attributes are added to hide the buttons the embed-template. The attrubutes can be set tonone
:
- data-vidi-legend
- data-vidi-layer
- data-vidi-background
- data-vidi-fullscreen
- data-vidi-about
- data-vidi-location
- conflictSearch now prints with concurrency when selecting a multiple page report.
- State loaded from snapshot now is set in localforage. This was a regression bug.
- Drawings made in Measurements now is stored in state and will stick between refreshes and in snapshots.
- New runtime config
initZoomCenter
, which will locks Vidi to a specific zoom/center. This will override zoom/center in URL and snapshot link.
- Lazy load of snapshot data. The loaded snapshot list now only includes metadata - not the snapshot data itself. When activating a snapshot the data is fetched. This way a long snapshot list will load faster and not fill the memory.
- Added config options to the symbol module.
- New GC2 meta settings for controlling zoom level visibility for vector layers:
vector_min_zoom
andvector_max_zoom
. The values must be tile set zoom levels. - New GC2 meta setting for bind a tooltip to vector layers:
tooltip_template
. This is a mustache/handlebars template where feature properties can be uses:
- For each activated layer there is now created a map pane named
[schema]-[layer]
and the layer is added to this. The sort layer function will work on the panes instead on layers. This way both tile and vector layers can be sorted between each other.
- Issue regarding side-by-side base layers: digidem/leaflet-side-by-side#43
- Issue regarding
featureInfoTableOnMap
and pop-up error when single feature is selected.
- In pop-ups and vector tables values are now replaced with rendered mustache template if provided through GC2.
- Legend moved to upper right corner in embed.tmpl, so it doesn't coflict with the bottom aligned vector table.
- Pop-ups are not longer opened when selecting a row in table, because this will let gc2table control the pop-up and here editing tools are not supported.
- Full Danish translation of
coordinates
module. - Bug regarding nested double mark-up in pop-ups links fixed.
- Links in pop-ups and tables will not be generated if value is null or empty string.
- The URL parameters
var_matrikelnr
andvar_landsejerlavskode
will trigger search on the specified cadastral number usingdanish
module. These parameters are already used in moduleconflictSearch
.
- UTFgrids are now single tiled for better performance due to fewer network reqeusts. But MapCache can't "untile" raw data, so the GC2 Meta setting
cache_utf_grid
will be ignorred. - Upgraded to Leafletjs 1.8 and Bootstrap Table 1.2.0.
crossMultiSelect
on vector features now used@turf/boolean-intersects
instead of comparing the bounds of features with Leafletjs. This gives the expected result when clicking on stacked vector features.
- When signed in as a sub-user, cached tile layers wouldn't work but give a 404 error. Vidi changed the 'db' URI part to 'user@db' but the URI for cached layers can't be dynamic.
- Added some auto-pan-padding to accordion popups, so they don't open up outside the map.
- When selecting a vector feature it will now get the below shown style. Colors will not be changed. Get Feature info on raster tile layer will use the same style, but get a red outline.
{
"opacity": 1,
"weight": 5,
"dashArray": "8 5",
"lineCap": "butt"
}
- If all cookies are blocked in the browser, Vidi will now still startup, but with a blank state.
- The layer tree now has a "Layer filter" function. This makes it possible to filter layers according to inputted text in a form field above the layer tree. The layer tree will re-render as the user types ahead leaving only layers which matches the text. The matching is done as a case-insentive substring search.
- When editing a raster tile layer the altered properties for the feature-info template is also send to the editor. So e.g. HTML tags for links and images are rendered in the editor form. Now an unaltered clone is send instead.
- A block/unblock event is added in
infoClick
module, så other modules can block feature-info clicks from happening. This is implemented ineditor
, so feature-info clicks are blocked while creating new features.
- In conflictSearch requests to the GC2 SQL API now happens concurrently. This is done by implementing a promise pool. The default size of the pool is 30, but this can be set in the build config. Note that this setting can't be changed in a run-time config.
- conflictSearch now has a
stateless
option, which can be set in both build and run-time config. In stateless mode the state of the module will not be kept. Defaultfalse
.
{
"extensionConfig": {
"conflictSearch": {
"poolSize": 40,
"stateless": true
}
}
}
- Tile layer opacity state now is kept betweens browser refreshes.
- Now uses sfe_ejendomsnummer instead of esr_ejendomsnummer in search of 'adresser' and 'matrikel'.
- Regression bug, which kept the right side-panel closed after load of app.
- The Leaflet method
toGeoJSON
rounds of coordinates with 6 decimals by default. But this may result in up to 10 cm on the map (tested at about 57 degrees north). This makes the editor and snapping very unprecise. So alltoGeoJSON
calls are now done with a precision argument of 14 through out the app.
- Bug in sqlQuery.js, which rendered feature-info inoperable.
- Added
geolocation
to theallow
attribut on the created iframe in embed.js.
- Added GC2 Meta option for tiled raster layer:
tiled
. If set totrue
the layer will be fetched in tiles instead of one big single tile, which is default. The layer visibility detection still works, but will be more inaccurate because of the nature of tile loading. But it will always be false visible. - A new option in embed.js:
data-vidi-no-tracking
, which will disable the Vidi tracking cookie used for advanced functions like state-snapshots and printing.
- Tracking cookie will now be set as
secure=true
andsameSite=none
if env var NODE_ENV is set to 'production'. This will fix issues with embeding Vidi and setting the cookie. - Vector feature table can now be placed to the right or at the bottom of the screen. The table is removed when layer is
switched off. Only one table can be displayed at a time. New config for setting position and width/height.
width
only has effect then postion isright
andheight
only when position isbottom
.width
can be both relative%
and absolutepx.
height` can only be absolute:
{
"vectorTable": {
"position": "right",
"width": "30%",
"height": "250px"
}
}
- Some bugs regarding vector feature table and dynamic load.
- Added config setting for auto panning the map when pop-up's opens, so they don't stay outside the map:
autoPanPopup: false|true
- Pop-ups on vector layers will use simple pop-ups when
crossMultiSelect
isfalse
instead of the accordion template. This make pop-up behaviours similar on tile and vector layers.
- Some issues regarding pop-up behaviours when
crossMultiSelect
istrue
and editor is enabled:crossMultiSelect
will be set tofalse
when editor is enabled. - Config defaults are now handle one place in the source and all settings have defaults. No longer need for testing if a setting is undefined.
- Better support for special characters and upper case in layer names. Fixes a UTF8 error in WMS requests and quotes schema/relation names in feature info requests.
- In the editor the counting of vertices in LineString features failed with NaN and it was impossible to edit. This is fixed with implementing a proper counting rutine.
- Use UTM instead of web-mercator when projeting/unprojecting the print frame or the different will be to big.
- Fix for buggy print recreation from state. The print frame was re-calculated each time the state was applied making a small change in latitude coords. This made the frame drift south-east and rendered errors on big geographical frames.
- The
df
extension is changed, so it can use both Dataforsyningen and Datafordeler. New setup (token has precedence):
{
"df" : {
"datafordeler" : {
"username": "...",
"password": "...",
"token": "..."
},
"dataforsyningen" : {
"username": "...",
"password": "...",
"token": "..."
}
},
"baseLayers": [
{
"type": "wms",
"url": "/api/datafordeler/GeoDanmarkOrto/orto_foraar/1.0.0/WMS",
"layers": [
"geodanmark_2020_12_5cm"
],
"id": "geodanmark_2020_12_5cm",
"name": "TEST geodanmark_2020_12_5cm",
"description": "geodanmark_2020_12_5cm",
"attribution": "Styrelsen for Dataforsyning og Effektivisering",
"minZoom": 8,
"maxZoom": 22,
"maxNativeZoom": 22
},
{
"type": "wms",
"url": "/api/dataforsyningen/topo_skaermkort_DAF",
"layers": [
"dtk_skaermkort"
],
"id": "dtk_skaermkort",
"name": "Skærmkort",
"description": "DTK/Skærmkort",
"attribution": "Styrelsen for Dataforsyning og Effektivisering",
"minZoom": 8,
"maxZoom": 22,
"maxNativeZoom": 22
}
]
}
- Field ignore setting from GC2 will now exclude the field from being queried in sqlQuery module (feature info).
- The location circle marker is now orange in follow-mode and blue when not following. Location now works the same in both embed and default templates.
- The legend toast dialog in embed template will now be pushed to the right when sliding out the layer tree. This way the elements will not be stacked.
- The search-result element in
conflict.tmpl
now has a dynamic height, so it will fit the parent window.
slideOutLayerTree
is now inwoked after vidi is ready making it more stable.
layerTree
state was not updated when Vidi was initiated with layers in URL anchor, resulting in no active layers in state until some changes was done by user afterward.
- Hit count added to the "Data fra konflikter" tab in
conflictSearch
module. - Some changes in
conflict.tmpl
, so it's easier to customize it.
- API endpoint for proxify base layer requests to Datafordeler.dk. The API rewrites the URL and adds
username
andpassword
. The base layer url follows this pattern:/api/df/[Datafordeler URI]
. Example Setup inconfig/config.js
:
{
"df" : {
"userName" : "QMO.....",
"password" : "3Ps....."
},
"baseLayers": [
{
"type": "wms",
"url": "/api/df/GeoDanmarkOrto/orto_foraar/1.0.0/WMS",
"layers": [
"geodanmark_2020_12_5cm"
],
"id": "geodanmark_2020_12_5cm",
"name": "TEST geodanmark_2020_12_5cm",
"description": "geodanmark_2020_12_5cm",
"attribution": "Styrelsen for Dataforsyning og Effektivisering",
"minZoom": 8,
"maxZoom": 22,
"maxNativeZoom": 22,
"transparent": true
}
]
}
- Draw tool bar will now be positioned beside the main tools, if screen height is below 700px.
- Vector table now only shows in
embed.tmpl
.
- Session cookie (connect.gc2) will now be set as
secure=true
andsameSite=none
if enviromental variable NODE_ENV is set to 'production'. This will fix issues with embeding Vidi and protected layers. To set NODE_ENV in docker-compose file, use this:environment: - NODE_ENV=production
- Intended code error removed from
conflict
module in excel function.
- A new config
initFunction
, which holds a JavaScript function as a string. When Vidi is fully loaded this function will be run:{ "initFunction": "function(){alert(\"Hello\")}" }
- The
reportRender
issue inconflict
module regarding state resolving is fixed. - The alternative
reportRenderAlt
module forconflictSearch
can now be set in config:{ "extensions": { "browser": [ {"conflictSearch": ["index", "reportRenderAlt", "infoClick", "controller"]} ] } }
- Legend added in blank.tmpl (which is used in static maps). Also the legend checkboxes are removed from legends in blank.tmpl and print.tmpl.
- Extensions are initiated before state resolves, so extensions work in state urls.
- Measurement tooltip will now show one decimal instead of none when showing meters.
- Serialization of line extremities was buggy when lines was recreated after applying state causing extremities not to be drawn.
- Links in pop-ups now gets the primary color of the theme instead of the fixed cyan color.
- Serveral smaller fixes for the Editor extension.
- embed.js API: Only fire snapshotLayersCallback once.
- Excel write erors in conflict module is now handled, so Vidi doesn't crash.
- Regression bug regarding print. The metadata object was stripped from the payload in ealier release, but was necessary for recreation of layers. Now a slim downed version of meta are send.
- The layer-group-checkboxes now have id's, so it's easier to apply css rules. Ids follow this pattern:
group-check-box-[group-id]
. Use the dev tool inspector to get the id.
- Docker base image update to debian:bullseye-slim.
- Callback functions in embed.js. Two functions kan be defined in the parent page like this (with
data-vidi-frame-name="map1"
):- When Vidi is ready:
embedApi.vidiReady["map1"] = () => { console.log("Vidi is ready") }
- When active layers from the snapshot is ready:
embedApi.activeLayersReady["map1"] = () => { console.log("Active layers are ready") }
- In conflictSearch module, the adding of sheets to excel is now in a try/catch so invalid sheet names won't crash the Node process.
select_function
is now called when opening a panel in a accordion pop-up.
- Print and Conflict modules will not longer keep unnecessary Meta data in state. This reduce the data volume.
- Layer tree will now build with all valid layers. Before it would start building as soon an invalid layer was proccess leaving out the rest.
- Regression bug. Draw module labels are now again serialized as labels - not markers.
- Conflict Excel output: Two sheets can't have the same name, which will result in error. In case of same names, the last char is changed to a number.
- Conflict report will now default to "Compact" if none is choosen.
- No MapCentia logo in default and conflict print template. Logo can be set with external css sheet. Some thing like this:
#print-header-logo{
background-image: url('https://.....');
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: 80%;
}
- embed.js: If host in token is http, then make it protocol relative, so tokens created on http still works when embedded on https sites.
- It's now possible to switch all layers on/off in a layer (sub)group. Enable the checkboxes with the
showLayerGroupCheckbox
conflig. - Some visual improvements to the display of sub-groups in the layer tree.
- Editing of geometry is not possible when number of nodes exceed 1.000. But attribut data can still be edited. A high amount of nodes will hog down the browser and it can crash.
- The Snapshot module will now use base64url encoded body for getting, creating and updating snapshots. This way will a JSON value
ILIKE '%12'
not mess things up when decoded server side. This requires an update of GC2. - Snapshot list is now ordered by update date/time and this is also what's displayed instead of create date/time.
- Frame number on prints will not be shown when only one frame is printed. Custom print needs an update:
{{#showFrameNumber}}#{{printFrame}}{{/showFrameNumber}}
- Frame numbers starts with 1 instead of 0.
- New format for setting redis host. Now the database number can be set:
{
"redis": {
"host": "127.0.0.1:6379",
"db": 2
}
}
- An API loaded with the
embed.js
script. Two methods are available:embedApi.switchLayer
andembedApi.allOff
. See docs for details. - Mouse over on vector and raster tile layers. The latter using UTF Grid. These GC2 Meta properties are controling the mouse over:
hover_active
Boolean. Should mouse over be switch on?info_template_hover
String. Handlebars template to use in label. If not set a default template will be used, which loops through fields with theShow in mouse-over
property checked.cache_utf_grid
Boolean. Wether to cache UTF grid tiles. Only apply to raster tile layers.- Excel report is now available in conflict module. Each layer with hits will have its own sheet. For for sheets to get populated with hits the "Show in conflict" option must be checked for a least one field in the Structur tab in GC2 Admin.
- New config option
activeLayers
. This option is a array of schema qualified layers with any type prefix (:v, :mvt, :w), which should be switch on from the start. If a snapshot link is used for starting Vidi, this option will be ignored.
{
"activeLayers": [
"schema.layer1",
"v:schema.layer2"
]
}
- Feature info click wouldn't open the pop-up if multiple layers was switch on.
- Drawings are not longer dashed, when selected.
- Conflict search module will now search protected layers if user is signed in.
- On
zoomToExtentOfgeoJsonStore
in geocloud.js pan map one pixel to defeat a strange bug, which causes a browser freeze. - Layer filter auto complete menu is now postioned absolute instead of fixed, so it will not hang in the same place when scrolling layer tree.
- Composit QGIS Layers now work. They are not longer bypassed by MapServer where the merge request is done.
- Node >= 14 er required.
- Docker files are added to the project.
- It's now possible to set
gc2.host
through the environment variableGC2_HOST
. If set inconfig/config.js
it will have precedence. - ConflictSearch is now controlled by state module. It will keep state between on/off and browser refreshes. State in conflictSearch is also applied when running a state-snapshot.
- Changes in Snapshot UI. The UI is now more clean.
- When the
session=[id]
URL key/value is used, it will now reset theconnect.gc2
session cookie, even if it's set through the sign-in UI. To do that the HttpOnly cookie flag is removed, which will aggravate the risk of client side script accessing the cookie. The cookie is also removed when sign-out is done through the UI. - CSS and templates files can now be placed in a sub-folder on the
configUrl
host. Only one level deep likestyles/custom.css
. - Layer tools in the layer tree now have parent span elements with theese ids, so it's easier to to set a css display rule on them:
#layer-tools-offline
#layer-tools-search
#layer-tools-opacity
#layer-tools-labels
#layer-tools-tables
#layer-tools-load
#layer-tools-filters
repeatMode
is set totrue
for tools in Draw, so tools stay active.
- It's possible to lock UTM zone in coordinate module, so it's possible to project to a specific zone outside the actual zone. Useful for e.g. Denmark, which are using zone 32 for the whole country but is located in both 32 and 33.
{
"coordinates": {
"lockUtmZoneTo": 32
}
}
- A new build configuration for setting widths for the left slide-out panel in default template.
-
"leftSlideWidths": [300, 400, 550]
-
- Under filters in the layer tree it's now possible to download the layer as either: GeoJSON, Excel or CSV
- Base64url are now used to encode filters instead of base64, so + and / sign doesn't mess things up.
- Changes to Snapshot UI, which fixes an issue with wrong URLs in input fields.
- Drawing is stored in state, but was not recreated after refresh of browser. This could get "invisible" drawings stored in snapshots.
- If a layer in a state snapshot is for some reason not available (protected, deleted), the build of the layer tree was ever resolved. Now it'll resolve.
- The queueStatisticsWatcher and Service Worker now uses 3. party module for base64 decoding, because windows.btoa fails on non-latin characters.
- COWI Gade foto named properly in Streetview module.
- A lot of fixes in the Editor module.
- The standard template for feature info is changed, so empty fields are omitted. It's now:
searchConfig.placeholderText
added to config, so the search placeholder can be customized.- A callback function can now be added to interval reload of vector layers. The callback will be fires when layer changes. Meta option is
reload_callback
:
function(store, map) {
var audio = new Audio('https://ccrma.stanford.edu/~jos/mp3/gtr-nylon22.mp3');
audio.play();
var latest;
store.geoJsonLayer.eachLayer(function (layer) {
latest = layer
})
map.setView(latest.getLatLng(), 18)
}
- The max zoom level when selecting a row in a layer table can be with
setmax_zoom_level_table_click
. If not set or is NaN the max zoom level will default to 17.
- MapCache layers now work. Both raster and vector tiles.
- Timeout (10.000ms) on sqlStore. Feature info will now handle errors or cancels (e.g. due to timeout) on SQL requests and a "toast" will inform the user. If timeout happens the request will be re-tried.
crossMultiSelect
will always show vector feature info if a simultaneous raster SQL request fails or timeouts.- Memory leak fixed when reloading vector layers.
- Interval reload of vector layers are now done with the
load
method instead of switching the layer off and on. - Update of interval reloaded vector layers happens only if data has changed.
- Use native URL API instead of uriJs module.
- Still resolve promise in
localforage.setItem
, to avoid a net:ERR_FAILED in the browser when e.g. getting feature info. The issue about error on setItem persist. - Some fixes regarding Internet Explorer.
- The awesome Leaflet plugin Leaflet.markercluster is added, so by setting the meta property
use_clustering
totrue
clustering can be enabled on single point vector layers. No other setting for Leaflet.markercluster is available for now. - With the
cssFiles
config it's possible to load external css file from theconfigUrl
. E.g.:
{
"cssFiles": [
"myStyles1.css",
"myStyles2.css"
]
}
- Conflict is now using
sqlQuery.js
to show info-click result. So now are multiple results possible. ThesqlQuery.js
module now has a Simple mode, a prefix for DOM elements to render in and callback for when selecting a row. - New config setting
dontUseAdvancedBaseLayerSwitcher
which will disable the 'Display two layers at once' option in the base layer switcher. - New GC2 Meta properties
select_function
which adds an onSelect callback to the result list in click-for-info. - It now possible to render an image carousel in popups from a click-for-info. Create a JSON field with a value like this and set Content to Image:
[
{
"src": "https://image1.jpeg",
"att": "It's an image!"
},
{
"src": "https://image1.jpeg",
"att": "It's another image!!"
}
]
- URL's can now be ignored for caching in Service Worker by using the
urlsIgnoredForCaching
setting inconfig/config.js
. This setting can only be set in build time. E.g.:
{
"urlsIgnoredForCaching": [
{
"regExp": true,
"requested": "part_of_the_url"
}
]
}
- Print setup can now be "sticky" (by using the state module), so it will not reset when re-activating the module. Stickiness can be toggled and off. Off is default.
- Print setup is now stored in state snapshots. After state snapshot is activated the print setup will use the stored settings. The sticky toggle must be set to on or else the default print settings will be used.
- New print API
/api/print/[database]/?state=[state id]
which will return the stored print from a snapshot as PNG (PDF is coming). The print will be created on the fly. embed.js
has two new attributes:data-vidi-use-config
anddata-vidi-use-schema
. These will trigger the use of schema and/or config from the token if present.- New GC2 Meta property which automatically can open a layer tool when the layer is switched on:
- default_open_tools: JSON array with tools to open. Available options:
["filters","opacity","load-strategy","search"]
("table" are not supported)
- default_open_tools: JSON array with tools to open. Available options:
- New GC2 Meta properties:
- disable_check_box: boolean, disables the layer check box:
- When filtering a layer all its child layers with this property set to true will have their check boxes enabled. And when the filters are disabled again all child layers will be turned off and have their check boxes disabled again.
- This makes it possible to setup child layers, which can only be viewed when filtered by its parent layer.
- filter_immutable: boolean, makes the filter setup immutable.
- Then set, the arbitrary filter setup can't be changes. Only values can. Should be used together with
filter_config
.
- Then set, the arbitrary filter setup can't be changes. Only values can. Should be used together with
- reload_interval integer, set a reload interval for vector layers. Can be used to autoload fresh data from live data sources. Units are milliseconds.
- show_table_on_side: boolean, render the vector list of the layer in an injected element with id
vector-side-table
, so you get a map and list side-by-side. - zoom_on_table_click: boolean, whether the map should zoom to vector feature or not when clicked in table. Is set on both vector layer tables and feature info result tables.
- disable_check_box: boolean, disables the layer check box:
- A Reset filter button is added, which will reset the filter to the original state.
- The
infoClickCursorStyle
setting will set cursor style when using feature info click. Can be set topointer
orcrosshair
. The setting can be set inconfig/config.js
or in a runtime config. - New Autocomplete control in filters. The control will fetch distinct values from PostgreSQL for use in the autocomplete field. All distinct values are fetch at once. 100.000 distinct values can be handle without problems. Only works on text fields and must be enabled in GC2 Structure tab.
- The attribute
data-vidi-host
is added toembed.js
, so it's possible to override the host from the token. This makes it possible to generate tokens on one setup and use them on others. E.g. on mirrored internal/external setups. - The Coordinate module now has a Pan To input field. The user can input a coordinate in the chosen system and the map will pan to the point.
- Modules now has title headings.
- Added boolean config
vectorMultiSelect
inconfig/config.js
. This will enable multi select on vector layers. Works cross layer too. Can be set in runtime config. - Added boolean config
featureInfoTableOnMap
inconfig/config.js
. This is a shortcut to setinfo_template
,info_element_selector
andinfo_function
, so the single feature info pops up on the map instead of the right slide panel. Great for theembed.tmpl
- New button "Fit bounds to filter" in layer filters, which will set the view extent to the bounds of the filtered layer.
- New "Labels" panel for raster tile layers with a checkbox for hiding/showing labels on the layer. Works for both MapServer and QGIS back-end (GC2 must support this).
- Added boolean config
crossMultiSelect
inconfig/config.js
. This will enable cross multi select on both vector and raster tile layers. This will result in a unified feature info experience, which are well suited for informative maps using theembed.tmpl
template. All feature info results will be displayed in an accordion widget. The accordion summary is default layer title, but can be set to an attribute value with the meta configaccordion_summery
. Can be set in runtime config. - WMS layers can now be added directly as base layers. A WMS base layer example:
{
"type": "wms",
"url": "https://services.kortforsyningen.dk/service?SERVICENAME=forvaltning2&",
"layers": ["Basis_kort","Navne_basis_kort","Husnummer"],
"id": "Basis_kort",
"name": "Basiskort",
"description": "Basiskort fra kortforsyningen",
"attribution": "Kortforsyningen",
"minZoom": 4,
"maxZoom": 22,
"maxNativeZoom": 22
}
- XYZ layer can be added as base layer like this (old feature but was undocumented and buggy):
{
"type": "XYZ",
"url": "https://m3.mapserver.mapy.cz/base-m/{z}-{x}-{y}?s=0.3&dm=Luminosity",
"id": "mapy",
"name": "Mapy",
"description": "Map from Mapy",
"attribution": "Mapy",
"minZoom": 1,
"maxZoom": 20,
"maxNativeZoom": 19
}
-
public\js\vidi.js
is now required instead of loaded in a script tag. This way it's transpiled and can contain new JavaScript syntax. -
A lot of improvements in the
conflictSearch
module:- Results are now alpha sorted within layers groups (which is also sorted). Both in web and PDF.
- A short and long description can be added for each layer, which is shown the result list. Use GC2 Meta properties:
short_conflict_meta_desc and
long_conflict_meta_desc`. - The styling of both web and PDF results is better. Tables can't overflow the PDF page.
- Ellipsis is used both in web and PDF when fields names / results are too long.
- Empty link fields will now just be blank.
- Layers with only one report column will be printed as a
|
separated string and not a table with one column. - New button for setting the print extent before creating a PDF.
- Mouse click when releasing a rectangle/circle drag is suppressed.
- Multiple results from a Select-Object-To-Search-With is now possible. The standard
sqlQuery
is used to create list.
-
Indicator in layer tree showing if a tile layer (MapServer or QGIS Server) is visible in the view extent. The Leaflet layer canvas element is being checked for colored pixels. Be aware of the canvas being bigger than the view extent because of the buffer. A event is triggered when a layer changes visibility called
tileLayerVisibility:layers
with a payload like this:
{
"id": "schema.layer.geom",
"dataIsVisible": true
}
- Handlebars are now use instead of Mustache for rendering click-for-info templates. Handlebars is more feature rich than Mustache.
- The load screen is now being dismissed on
ready:meta
instead ofallDoneLoading:layers
. This makes the application interactive sooner. - Predefined filters are now processes as one string. Instead of sending something like this
["foo=1","foo=2"]
to GC2, it is now["(foo=1 OR foo=2)"]
. This is how arbitrary filters work and both kind of filters are now being processed together in one string like"(foo=1 OR foo=2) AND (bar=1 OR bar=2)"
. Vidi can therefore now set the operator between the predefined and arbitrary filters. - The filters from the layer tree are now set on the Click-For-Info module, so you only get filtered hits.
- The applied filters will now be shown as a WHERE clause in an Ace editor under the filter widgets. It's possible to mutate the clause and apply the altered filters. When doing that, the filter widgets will be disabled until the editor is disabled. All filters settings are stored in state.
- In arbitrary filters, the field alias is now being used if set.
- Limits for puppeteer processes can now be set with this in
config/config.js
:
{
"puppeteerProcesses": {
"min": 1,
"max": 5
}
}
- The
Enable filtering
property of the Structure tab in GC2 is now calledDisable filtering
and will if check omit the field in Vidi filtering. The property was not used before. - Babel bumped to version 7
- Local GC2 config files are now fetched through the server back-end.
embed.tmpl
will now show login button if session module is enabled.- The WMS requests now has a
qgs
parameter for QGIS backed layers. The value is path to the qgs file for the layer (base64 encoded). In GC2 the path will be used to send the request directly to qgis_serv instead of cascading it through MapServer. - Raster tile layers without pixels (invisible in the map) are now not queried by feature info.
- Turning on a vector layer will now load the legend of the raster tile representation of the layer
- Using
indexOf
instead ofincludes
, because the latter is not transpiled in Babel. It's an Internet Explorer issue. embed.js
now works in IE11.- Accept 'da' locale in request headers. Only da-DK worked so far.
- If the Service Worker doesn't get registered when Vidi will now start anyways without the Service Worker. On a hard refresh (Ctrl-f5) the Service Worker will claim the clients, so a hard refresh will not unregister Service Worker, but the cache will be deleted.
- Text in editor is now url encoded.
- Quotes are now escaped for text in the editor.
- All numeric Postgres types are now handled correct in the editor.
- Puppeteer processes are now destroyed, if an exception is thrown during print. This prevents leak of processes.
- Re-acquirement of a Puppeteer process is done if timeout, so the print will eventual be finished.
- Puppeteer processes will be destroyed after 60 seconds. This prevents hanging processes, which blocks further prints.
- Custom user data from GC2 is now added to session the object.
- Handling of invalid JSON configs.
- CalVer is now used with month identifier like this: YYYY.MM.Minor.Modifier
- Custom searches can now be added to danish search module.
embed.js
will wait with loading Vidi until target element is visible in the DOM. This way, Vidi can be embedded in a element withdisplay:none
.- Its now possible to add custom extra searches to
danish.js
. A search needs an Elasticsearch index, which must have an id and string property. The latter is the search string. Also a look-up table/view with geometries is required. An example of a setup:
{
searchConfig: {
size: 4,
komkode: "*",
esrSearchActive: true,
sfeSearchActive: true, // Example of config for danish search
extraSearches: [,{
name: "stednavne_search",
db: "dk",
host: "https://dk.gc2.io",
heading: "Stednavne",
index: {
name: "stednavne/navne_samlet",
field: "string",
key: "gid",
},
relation: {
name: "stednavne.navne_samlet_geom",
key: "gid",
geom: "the_geom"
}
}]
}
}
-
New GC2 Meta properties which controls the info pop-up and styling of vector layers:
- info_template: Mustache template for use in pop-up.
- info_element_selector: Which element to render info template in? Defaults to pop-up.
- info_function: Function which is run when clicking on a vector feature. Takes five args: feature (Leaflet), layer (Leaflet), layer key (Vidi), SQL store (Vidi) and map (Leaflet).
- point_to_layer: Leaflet pointToLayer function.
- vector_style: Leaflet vector styling function.
-
The help buttons now work like toggles, so a second click will close the help box.
- Handling of invalid JSON configs, so Node doesn't crash.
- Implemented a generic pool for puppeteer processes, so there is always a warm chromium browser ready for print.
- Node clustering implemented with default count of workers, which is the cpu core count.
- Sticky sessions implemented so Socket.io works with clustering.
- Redis added as storage for sessions. Just set
redisHost
inconfig/config.js
. If not set then file storage will be used.
- A lot of optimization of Javascript code. Code that can is lazy loaded.
- The server is now using gzip compression.
- Meets the requirements for a Progressive Web App (PWA) according to Google Lighthouse.
- The startup message set by
startUpModal
is ever shown in print. - Images in pop-ups will now open in new tab when using Chrome.
- Embed script for easy embedding of Vidi in web pages using a snap-shot token.
- A corresponding UTFGrid layer is now switch on when a raster tile layer is switch on. The UTFGrid layer is providing mouse over on features. Which fields are displayed in mouse over is set in GC2 field properties.
- Download drawings as GeoJSON.
- Comment with version in index.html
- Support of time, date and datetime fields in editor. Only time will be handled in a text field.
- Auto login. WARNING: Insecure and sets cookie with login creds. A build time setting
autoLoginPossible
must be set totrue
to make activation possible. Activation is done in:extensionConfig.session.autoLogin = true
and optionalextensionConfig.session.autoLoginMaxAge = 3600 * 1000
. The latter defaults tonull
- Static Map API. Generate PNGs of state snapshot. URL to PNG is available from the Snapshot module.
- Possible to set a welcome message by using
startUpModal
in a config. The user can dismiss the message by eitherClose
orClose and do not show in future
. The latter choise is stored in a cookie.
- Layers which have been switch off, will not be removed from legend (old behavior can be set in config)
- No re-load of legend if its not necessary.
embed.tmpl
is now a minimal template for embedding in web pages.- Home button on
embed.tmpl
will set the map to the initial extent if a snapshot-state is invoked. - Use file based sessions instead of memory based, so sessions can be shared between nodes in a cluster setup.
- Standard template for pop-up can now render videos from URLs in data. Can be set up in GC2.
- Infinity levels in layer tree. The levels are set with the
vidi_sub_group
Meta property in GC2 like:sub-group 1|sub-group 2|sub-group 3
- Smaller padding of dynamic loaded vector layers, so less features has to be handled. Padding is set to 0.3 from 1.
- Better wrapping of layer tools when side panel is narrow.
- Snapping bugs.
- SELECT statements like
SELECT * FROM foo WHERE bar LIKE '%foo'
will not longer give problems. - All Postgres types are now recognized in editor.
- Tentative support of WebGL layer type added.
- Support of MVT base layers.
- Optimized rendering of layer tree. Implemented lazy rendering of layer groups and tools.
- Hide login button if session module is disabled.
- Fall back mechanism for base layers. If the current base layer responses with error codes the next one is switched no.
- Touch drag enabled in layer tree.
- Config
activateMainTab
added, which tells Vidi to activate a tab on startup. - Visual grouping of map tools in GUI.
- Tentative support of Mapbox Vector Tiles (MVT). Needs latest version of GC2 with MVT support.
- Cross hair cursor when info click is on.
- When drawing or editing with the Editor module, snapping to other vector layers is added.
- Unify filter methods for vector and tile layers.
- After a query with the sqlQuery module is made, its now possible to store the query as a new "virtual" layer. The new layer is a vector layer, which acts like any other vector layer.
- State shots are now stored in GC2 database using the new keyvalue API.
- Protected WMS layers requests result in
401
being routed through the WMS backend. A authentication is implemented in order to request protected WMS layers correctly. - One click activation scheme where the module is activated when clicking the Tab. All others modules will be reset. A typical module should look like this:
- Google API files are no longer requested locally, because things break when Google makes updates. The files are requested remotely and are not cached in Service Workers due to CORS issues. The Google API doesn't work offline anyway. Google API must be set in GC2 config (App.php) with the kay ``
module.exports = {
set: function (o) {},
init: function () {
// Reset state and clear any effects of the module
backboneEvents.get().on("reset:all", () => {});
// Stop listening to any events, deactivate controls, but
// keep effects of the module until they are deleted manually or reset:all is emitted
backboneEvents.get().on("deactivate:all", () => {});
// Activates module
backboneEvents.get().on("on:myModule", () => {});
// Deactivates module
backboneEvents.get().on("off:myModule", () => {});
}
}
- New mode for double base-layers: Overlay base-layers, where the opacity of the top one can be changed
- Filters for WMS single tile layers. Predefine filters in GC2 Meta, which will be displayed as checkboxes in a layertree panel. For now only supports QGIS layers.
- Vector filters can now be applied before switching a vector layer on.
- Table view are moved inside the layer tree, which makes it possible to see more than one table at a time.
- Table view clicks now pan to feature - not zooming.
- Popups for raster and vectors are now similar.
- When clicking in a table with points, panning now works.
- Workaround missing Service Workers features in Edge 17/18.
- Filters work in Edge 17/18.
- A lot of smaller issues were fixed.
- Specific vector layers can be set to offline. If offline the cached version of the vector layer is always used. Also if browser is reloaded.
- Control to switch all vector layers on and off. See above.
- Vector layers can now be set to two different load strategies: Static and Dynamic. The former is default and will load the entire layer at once. The latter will load only whats inside the view port (plus a buffer) and fetch new data when needed (when zoom/pan occurs). The load strategy is controlled by the GC2
load_strategy
meta setting. Can be eithers
ord
. - New map controls: Reset zoom, set previous/next extent and box-zoom. The latter now has a button, before this could only be achieved by holding shift down and drag the zoom box.
- Opacity slider for all tile layers.
- Preset base layer in URL will not longer change to
undefined
when resizing browser during refresh. - System field with prefix
gc2_
is no longer displayed in Editor attribute form. - Stalling of print is fixed.
- Drag'n'drop sorting of layers in layer tree. Sorting can be done between layers in a group and groups between groups. Sorting sticks after refresh of browser.
- Third level in layer tree. The third sub-group is set with the
vidi_sub_group
Meta property in GC2. - Vector layers are now treated equally with tile layers. With the
vidi_layer_type
Meta property set GC2 a layer can be displayed as either tile or vector. Its also possible to switch between tile and vector directly in the layer tree. - Vector layers can be filtered. An arbitrary number of filter expressions can be applied.
- Table view of vector layers. See the attributes and link to the geometry on the map.
- Service Workers. Vidi is becoming a Progressive Web App (PWA).
- Vidi starts without network. And always starts quick.
- Vector layers are cached, so they can be used without network.
- A change in source code will generated a new version hash, which will trigger the Service Workers to re-install the application.
- Offline base layers. Base layers can be partial caches in browser for use without network.
- Editor. Both tile and vector layers can be edited. Edits can be done without network.
- Side-by-side base layers. Swipe between two base layers.
- Save, restore and share projects. A project comprises the extent of the map, which background map is visible and which layers are turned on, which filters are applied as well as your drawings. You can share a project by sharing a URL. If you are not logged in, projects will be linked to the browser you are using. Otherwise, they will be stored under your user login. It is possible to transfer projects from browser to login.
- New Kepler.gl module. Select layers in Vidi and start Kepler.gl with them. Kepler.gl is embedded in Vidi.
- Proper implementation of non-tiled layers, which is well suited for layer with live data and heat- and cluster maps.
- New user interface layout in default template. Where are now more space for the module dialogs.
- Leaflet.js updated to newest.
- Print now uses Puppeteer instead of Wkhtmltopdf. Puppeteer can be installed and updated with npm as any other module and its easier to debug.
- Is fully supported only in browsers with Service Workers.
- Layers Search module. This function is now moved to the contrib module vidiSearch.
- Calculation of area on drawing module now works.
- A lot of modules where updated.