geoadmin / web-mapviewer

The viewer application for maps and geodata
https://map.geo.admin.ch
Other
63 stars 12 forks source link

KML style seems not to be applied correctly #973

Closed rueschm closed 3 months ago

rueschm commented 4 months ago

Hi,

we noticed a change in the interpretation of KML files with the last update of the web-mapviewer.

For the following KML: https://stationdocu.slf.ch/kml/IMIS_WIND_EN.kml the labels are shown despite the scale of the LabelStyle is set to 0

see: https://map.geo.admin.ch/#/map?lang=en&center=2677784.26,1177260.08&z=1.409&bgLayer=ch.swisstopo.pixelkarte-farbe&topic=ech&layers=KML|https://stationdocu.slf.ch/kml/IMIS_WIND_EN.kml

We also noticed a change in the interpretation of the IconStyle scale, the icons are now shown much larger than in the old version)

Best regards

hansmannj commented 4 months ago

Hi there

Thanks for reporting, we will have a look into this!

Best regards Juergen

ltshb commented 3 months ago

Hi @rueschm the issue for the labelStyle with scale=0 has been resolved and deployed, feel free to test. Concerning the icon size the difference is due to a changes in openlayer icon rendering. The previous map.geo.admin.ch viewer geoadmin/mf-geoadmin3 used an older openlayer version for map rendering, this version did not display icon size like google earth (which is the originator of KML). In the latest openlayer version this issue has been solved and now the icon scale in openlayer render icon like google earth. So you will see that if you import your KML in google earth, the icon will have the same size as on the current map.geo.admin.ch. web-mapviewer is now using the latest openlayer version.