geoadmin / mf-chsdi3

api3.geo.admin.ch source code
https://api3.geo.admin.ch
Other
33 stars 15 forks source link

JSON-layer: when in vectorStyle no property matches, JS error occures #2463

Closed rebert closed 7 years ago

rebert commented 7 years ago

JSON-layer: when in vectorStyle no property matches, JS error occures:

Uncaught TypeError: Cannot read property 'length' of undefined
    at olStyleForPropertyValue.getOlStyleForResolution_ (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/components/StylesFromLiteralsService.js:204:34)
    at olStyleForPropertyValue.getFeatureStyle (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/components/StylesFromLiteralsService.js:232:26)
    at https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/components/map/MapService.js:940:42
    at ol.renderer.canvas.VectorLayer.renderFeature (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/lib/ol3cesium-debug.js:49554:18)
    at Array.forEach (native)
    at ol.renderer.canvas.VectorLayer.prepareFrame (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/lib/ol3cesium-debug.js:49574:14)
    at ol.renderer.canvas.Map.renderFrame (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/lib/ol3cesium-debug.js:50202:23)
    at ol.Map.renderFrame_ (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/lib/ol3cesium-debug.js:60937:18)
    at ol.Map.<anonymous> (https://mf-geoadmin3.dev.bgdi.ch/ltrea/src/lib/ol3cesium-debug.js:59843:23)
rebert commented 7 years ago

of course, if nothing matches, it makes no sense show the layer...