diff --git a/build.config.js b/build.config.js index 19801bda..85f2f6f9 100644 --- a/build.config.js +++ b/build.config.js @@ -247,7 +247,7 @@ module.exports = { id: 'oslo', name: 'Oslo', description: 'Stedsbegrenset demonstrator med spesiell fokus på kunst og arkitektur, men også innhold fra pilotarbeidet knyttet til Akerselva og integrasjon med andre lokale kilder.', - url: 'demonstratorer/config.html?datasets=difo%2Cwikipedia%2Clokalwiki%2Chistorie%2Ckunst%2Criksantikvaren&komm=301&layer=norges_grunnkart_graatone&geomFilter=true&showGeom=true', + url: 'demonstratorer/config.html?datasets=difo%2Cwikipedia%2Clokalwiki%2Chistorie%2Ckunst%2Criksantikvaren%2Cgroruddalen%2Coslobyarkiv&komm=301&layer=norges_grunnkart_graatone&geomFilter=true&showGeom=true#13/59.9174/10.7649', appicon:'https://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Akrobaten_gang_og_sykkelbro.jpg/320px-Akrobaten_gang_og_sykkelbro.jpg', }, { diff --git a/common/js/DatasetLoader.js b/common/js/DatasetLoader.js index b63c98c7..2986a8a2 100644 --- a/common/js/DatasetLoader.js +++ b/common/js/DatasetLoader.js @@ -275,6 +275,7 @@ KR.DatasetLoader = function (api, map, sidebar, errorCallback, useCommonCluster, vectorLayer.enabled = _checkEnabled(dataset); vectorLayer.fire('changeEnabled'); + vectorLayer.shouldLoad = shouldLoad; if (!shouldLoad) { vectorLayer.clearLayers(); diff --git a/common/js/L.Knreise.GeoJSON.js b/common/js/L.Knreise.GeoJSON.js index 6ffc8b7b..857ae1e7 100644 --- a/common/js/L.Knreise.GeoJSON.js +++ b/common/js/L.Knreise.GeoJSON.js @@ -18,6 +18,7 @@ L.Knreise.GeoJSON = L.GeoJSON.extend({ this.addData(geojson); } this.on('click', this._featureClicked, this); + this.on('dblclick', this._featureDblClicked, this); this._selectedLayer = null; }, @@ -123,6 +124,17 @@ L.Knreise.GeoJSON = L.GeoJSON.extend({ this.setLayerSelected(layer); }, + _featureDblClicked: function (e) { + //zom map on double click on stopped polygon + if (this.options.dataset && this.options.dataset.toPoint && this.options.dataset.toPoint.stopPolyClick) { + if (e.layer.toGeoJSON().geometry.type !== 'Point') { + if (e.layer._map) { + e.layer._map.zoomIn(); + } + } + } + }, + getParentLayer: function (id) { var l = this._layers[id]; if (l) { @@ -164,9 +176,10 @@ L.Knreise.GeoJSON = L.GeoJSON.extend({ }, _zoomend: function () { - if (!this.options.dataset.toPoint) { + if (!this.options.dataset.toPoint || !this.shouldLoad) { return; } + var removedTemp = [], feature, i; diff --git a/demonstratorer/dovre.html b/demonstratorer/dovre.html index 1a63d3bb..fe6c4ffc 100644 --- a/demonstratorer/dovre.html +++ b/demonstratorer/dovre.html @@ -672,6 +672,8 @@