netzmacht/contao-leaflet-maps

Ordering fails on layer control element

Closed this issue · 2 comments

When ordering layers using the up/down arrows, the new order is not shown in the frontend element:
Backend:
2019-02-06 15_18_42-leaflet-karten karten teb begegnungsfonds fr kontrollelemente kontrollel
Frontend:
2019-02-06 15_19_08-ubersichtskarte - teb

Did I get it right: You can order the layers in the backend and save it but on the map the new order isn't applied, right?

Note for me: Looks like that ORDER BY sorting is missing here.

$query = <<<SQL
SELECT l.*, c.mode as controlMode
FROM tl_leaflet_layer l
LEFT JOIN tl_leaflet_control_layer
c ON l.id = c.lid
WHERE c.cid=? AND l.active=1
SQL;

Yes, tried again - ordering in the background does no affect the displayed order in the frontend.