@eeacms/volto-arcgis-block
Advanced tools
@@ -7,4 +7,21 @@ ### Changelog | ||
#### [0.1.18](https://github.com/eea/volto-arcgis-block/compare/0.1.17...0.1.18) | ||
- Update hidden parameter for legend on UseCases [`#55`](https://github.com/eea/volto-arcgis-block/pull/55) | ||
- Bugs n improvements [`#54`](https://github.com/eea/volto-arcgis-block/pull/54) | ||
- Use cases region highlight [`#53`](https://github.com/eea/volto-arcgis-block/pull/53) | ||
- Bugs n improvements [`#52`](https://github.com/eea/volto-arcgis-block/pull/52) | ||
- Develop [`#51`](https://github.com/eea/volto-arcgis-block/pull/51) | ||
- ESLint fix [`3768d68`](https://github.com/eea/volto-arcgis-block/commit/3768d688ab3f687a90be6ca43b614522c176815a) | ||
- Timeslider widget [`223490d`](https://github.com/eea/volto-arcgis-block/commit/223490dc5d9473faf9ea8b67226c5f5e5b9053ea) | ||
- Add option to show legend [`c27c33f`](https://github.com/eea/volto-arcgis-block/commit/c27c33f4d79f6170b580e1196d27ecbc6d82b21e) | ||
- Measurement bug fix [`8b80fe8`](https://github.com/eea/volto-arcgis-block/commit/8b80fe83ec8436e2d91d062fb41c033e636b441a) | ||
- Measurement bug fix [`eef88d5`](https://github.com/eea/volto-arcgis-block/commit/eef88d5d3495d306b35b0f16ecdf64f1a47d9c7e) | ||
- Add region highlight feature [`6082dbd`](https://github.com/eea/volto-arcgis-block/commit/6082dbd97109023850f4f5f85bc1a7e485eac2d1) | ||
#### [0.1.17](https://github.com/eea/volto-arcgis-block/compare/0.1.16...0.1.17) | ||
> 25 November 2021 | ||
- Develop [`#41`](https://github.com/eea/volto-arcgis-block/pull/41) | ||
- Fixed layer management & add WMTS Layer implementation [`#46`](https://github.com/eea/volto-arcgis-block/pull/46) | ||
@@ -11,0 +28,0 @@ - Use cases [`#50`](https://github.com/eea/volto-arcgis-block/pull/50) |
{ | ||
"name": "@eeacms/volto-arcgis-block", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "volto-arcgis-block: Volto add-on", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -830,3 +830,6 @@ import ReactDOM from 'react-dom'; | ||
{this.timeLayers[elem.id][1] === 'stop' && | ||
this.renderTimeslider(elem, this.layers[elem.id])} | ||
this.renderTimeslider( | ||
elem, | ||
this.layers[elem.getAttribute('layerid')], | ||
)} | ||
</div> | ||
@@ -833,0 +836,0 @@ </div> |
@@ -36,2 +36,4 @@ const markerType = 'simple-marker'; | ||
Services: { | ||
NUTS_service: | ||
'https://bm-eugis.tk/arcgis/rest/services/CLMS/NUTS_2021/MapServer/0', | ||
RegionLayer: | ||
@@ -42,3 +44,91 @@ 'https://bm-eugis.tk/arcgis/rest/services/CLMS/UseCasesRegion_count/MapServer/0', | ||
}, | ||
Codes: { | ||
EU: [ | ||
'BE', | ||
'EL', | ||
'LT', | ||
'PT', | ||
'BG', | ||
'ES', | ||
'LU', | ||
'RO', | ||
'CZ', | ||
'FR', | ||
'HU', | ||
'SI', | ||
'DK', | ||
'HR', | ||
'MT', | ||
'SK', | ||
'DE', | ||
'IT', | ||
'NL', | ||
'FI', | ||
'EE', | ||
'CY', | ||
'AT', | ||
'SE', | ||
'IE', | ||
'LV', | ||
'PL', | ||
'UK', | ||
], | ||
EEA: [ | ||
'AT', | ||
'BE', | ||
'BG', | ||
'CH', | ||
'CY', | ||
'CZ', | ||
'DE', | ||
'DK', | ||
'EE', | ||
'EL', | ||
'ES', | ||
'FI', | ||
'FR', | ||
'HR', | ||
'HU', | ||
'IE', | ||
'IS', | ||
'IT', | ||
'LI', | ||
'LT', | ||
'LU', | ||
'LV', | ||
'MT', | ||
'NL', | ||
'NO', | ||
'PL', | ||
'PT', | ||
'RO', | ||
'SE', | ||
'SI', | ||
'SK', | ||
'TR', | ||
//COOPERATIVES | ||
'AL', | ||
'BA', | ||
'XK', | ||
'ME', | ||
'MK', | ||
'RS', | ||
//FORMER MEMBER COUNTRY | ||
'UK', | ||
], | ||
}, | ||
NUTSRenderer: { | ||
type: 'unique-value', | ||
field: 'LEVL_CODE', | ||
defaultSymbol: { | ||
type: 'simple-fill', | ||
color: [172, 186, 71, 0.2], | ||
outline: { | ||
width: 1, | ||
color: greenRegion, | ||
}, | ||
}, | ||
}, | ||
SpatialRenderer: { | ||
@@ -45,0 +135,0 @@ type: 'unique-value', |
@@ -8,2 +8,3 @@ import React, { createRef } from 'react'; | ||
layerSpatial, | ||
layerNUTS, | ||
processedData = []; | ||
@@ -18,2 +19,3 @@ class InfoWidget extends React.Component { | ||
layerSpatial = props.layerSpatial; | ||
layerNUTS = props.layerNUTS; | ||
this.container = createRef(); | ||
@@ -28,2 +30,3 @@ } | ||
showUseCase(UseCase) { | ||
layerControl.getGeometry(UseCase.Spatial_coverage, layerNUTS); | ||
let responsibleOrganizationOrPerson = UseCase.Responsible_organisation | ||
@@ -34,2 +37,3 @@ ? UseCase.Responsible_organisation | ||
: ''; | ||
layerControl.showLayer(layerNUTS.id); | ||
return ( | ||
@@ -36,0 +40,0 @@ <> |
@@ -23,2 +23,3 @@ let FeatureLayer, Extent, mapViewer; | ||
outFields: ['*'], | ||
legendEnabled: layerInfo.legend, | ||
popupEnabled: layerInfo.popup !== undefined ? layerInfo.popup : true, | ||
@@ -30,2 +31,19 @@ }); | ||
getGeometry(country, layer) { | ||
layer.definitionExpression = `LEVL_CODE = 0 AND (`; | ||
if (country === 'EU' || country === 'EEA') { | ||
let states = mapViewer.props.cfg.Codes[country]; | ||
for (let i = 0; i < states.length; i++) { | ||
layer.definitionExpression += `CNTR_CODE = '${states[i]}'`; | ||
if (i < states.length - 1) { | ||
layer.definitionExpression += ' OR '; | ||
} else { | ||
layer.definitionExpression += ')'; | ||
} | ||
} | ||
} else { | ||
layer.definitionExpression += `CNTR_CODE = '${country}')`; | ||
} | ||
} | ||
/** | ||
@@ -32,0 +50,0 @@ * This method adds a layer to the map. |
@@ -102,5 +102,7 @@ import React, { createRef } from 'react'; | ||
<div | ||
hidden={this.mapViewer.state.useCaseLevel === 1} | ||
ref={this.container} | ||
className="legend-container" | ||
style={{ | ||
display: this.mapViewer.state.useCaseLevel === 1 ? 'none' : '', | ||
}} | ||
> | ||
@@ -107,0 +109,0 @@ <div |
import React from 'react'; | ||
let layerRegion, layerSpatial, mapViewer; | ||
let layerRegion, layerSpatial, layerNUTS, mapViewer; | ||
class NavigationControl extends React.Component { | ||
@@ -14,2 +14,3 @@ constructor(props) { | ||
layerSpatial = props.layerSpatial; | ||
layerNUTS = props.layerNUTS; | ||
} | ||
@@ -85,2 +86,5 @@ | ||
returnToPrevious() { | ||
// this.layerControl.hideLayer(layerNUTS.id); | ||
this.layerControl.getGeometry('none', layerNUTS); | ||
switch ( | ||
@@ -87,0 +91,0 @@ mapViewer.state.previousState === mapViewer.state.useCaseLevel |
@@ -19,3 +19,4 @@ import React, { createRef } from 'react'; | ||
navigationControl, | ||
layerSpatial; | ||
layerSpatial, | ||
layerNUTS; | ||
@@ -41,2 +42,3 @@ class UseCasesMapViewer extends React.Component { | ||
render: props.cfg.SpatialRenderer, | ||
showLegend: true, | ||
}; | ||
@@ -48,3 +50,10 @@ this.regionConfig = { | ||
label: props.cfg.RegionLabel, | ||
showLegend: false, | ||
}; | ||
this.NUTSConfig = { | ||
id: 'NUTSLayer', | ||
url: props.cfg.Services.NUTS_service, | ||
render: props.cfg.NUTSRenderer, | ||
showLegend: false, | ||
}; | ||
this.state = { | ||
@@ -141,2 +150,3 @@ useCaseLevel: 1, | ||
url: this.spatialConfig.url, | ||
legend: this.spatialConfig.showLegend, | ||
}); | ||
@@ -149,9 +159,20 @@ | ||
url: this.regionConfig.url, | ||
legend: this.regionConfig.showLegend, | ||
}); | ||
layerNUTS = layerControl.createLayer({ | ||
id: this.NUTSConfig.id, | ||
url: this.NUTSConfig.url, | ||
legend: this.NUTSConfig.showLegend, | ||
}); | ||
layerRegion.renderer = this.regionConfig.render; | ||
layerRegion.labelingInfo = [this.regionConfig.label]; | ||
layerNUTS.renderer = this.NUTSConfig.render; | ||
layerControl.addLayer(layerNUTS); | ||
layerControl.addLayer(layerRegion); | ||
layerControl.addLayer(layerSpatial); | ||
layerControl.hideLayer(layerNUTS.id); | ||
layerControl.hideLayer(layerSpatial.id); | ||
@@ -167,2 +188,3 @@ | ||
layerSpatial: layerSpatial, | ||
layerNUTS: layerNUTS, | ||
}); | ||
@@ -406,2 +428,3 @@ | ||
layerSpatial={layerSpatial} | ||
layerNUTS={layerNUTS} | ||
/> | ||
@@ -408,0 +431,0 @@ ); |
Sorry, the diff of this file is not supported yet
10542008
0.04%5881
2.4%