mf-geoadmin3 icon indicating copy to clipboard operation
mf-geoadmin3 copied to clipboard

Bug-Report: Stacking order of KML-Layers not always correct

Open smug007 opened this issue 7 years ago • 7 comments

In the "parameterized call of a map" its possible to specify KML-Layers. Most time the layers are displayed in the order as they appear in the URL. In let's say 10 % of the cases the layers are displayed in a wrong order. Example: https://www.skitourenguru.ch/?PANEL=2&AGREE=1&RISKIND=3&LANG=EN Click 20 times on a route in the list: The correct order of the KML should be (from Top to Bottom)

  1. Colored triangle (green, orange, red)
  2. Colored line (green, orange, red)
  3. Gray line
  4. Gray, transparent polygon

Sometimes the layer 2) gets hidden by the layer 3) because the layers load in a wrong order. The behavior is independent from browsers.

smug007 avatar Jan 15 '19 08:01 smug007

Duplicate of #4689

smug007 avatar Jan 15 '19 08:01 smug007

@smug007 I can not reproduce this one.. can you create Screencast of this one?

davidoesch avatar Mar 01 '19 09:03 davidoesch

Since we disabled gray route corridors (polygons) the effect is not so visible anymore, but its still there.

Just click on the map (iFrame) from one route to the next route. Therefore click in the Object -Info-Window on "To the route". Sometimes the colored line is stacked in top of the triangle, sometimes the triangle is stacked in top of the colored line. Seldomly it happens, that the colored line is hidden below the gray lines. Thats the worst case for the site. It occurs on all browsers (Firefox, Chrome, Opera). I test always with latest versions of browsers. trangleunderline_wrong trangleoverline_correct

smug007 avatar Mar 01 '19 10:03 smug007

Didn't want to close

smug007 avatar Mar 01 '19 10:03 smug007

@procastrinatio any hint?

davidoesch avatar Mar 22 '19 09:03 davidoesch

Hmmm,

  1. Async layers like KML or WMTS force the mustReorder flag, which reorder the layer according to the params layers order https://github.com/geoadmin/mf-geoadmin3/blob/9e1a0f214ea94e22552a02dccd0985689e43334c/src/components/map/PermalinkLayersService.js#L358-L361
  2. I did try with KML of very different size (https://s.geo.admin.ch/80d0d7f226), always in the defined order.

procrastinatio avatar Mar 22 '19 13:03 procrastinatio

Issue can be reproduced on www.skitourenguru.ch: Just go to the following Link and click from always in colored triangles: https://www.skitourenguru.ch/calc_data2/Skitourenguru.html?ID=294&PANEL=3&AGREE=1 -> From Toolstip: To the route

1 of 20 Clicks you will see, that the colored line (green, orange and red) is hidden under the gray lines.

smug007 avatar Nov 26 '19 15:11 smug007