geoadmin / web-mapviewer

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

PB-798: Leading/ending white spaces character is not supported in KML feature name - #patch #998

Closed ltshb closed 2 months ago

ltshb commented 2 months ago

The feature name in KML doesn't support leading/ending white space. Openlayer don't support it (also tried to used <![CDATA[]]> but don't work). On google earth we cannot add multiline feature titles ! and when using leading space it somehow cuts the end of the title so, not working neither.

The issue that we add is that leading white spaces were allowed and worked while drawing, but were trimmed by openlayer when loading the drawing, so user complained that their title did not stayed at the same place as the put them while drawing.

To avoid this we trim the text when entering it, so the text always appears trimmed in the view even in drawing. This way if the user add leading blank line the text stays at the top of the icon.

Test link

cypress[bot] commented 2 months ago

Passing run #2969 ↗︎

0 211 21 0 Flakiness 0

Details:

PB-798: Leading/ending white spaces character is not supported in KML feature na...
Project: web-mapviewer Commit: 7689ed05a7
Status: Passed Duration: 04:25 💡
Started: Jul 12, 2024 8:34 AM Ended: Jul 12, 2024 8:38 AM

Review all test suite changes for PR #998 ↗︎