-
Hi! I've got one set of Marker components, and a MarkerLayer inside of a GeoJSON. Currently, the markers in the MarkerLayer appear above the other (non-GeoJSON) markers, but I'd like it to be the other way around. Switching the order of them around doesn't seem to do anything. Is there a way to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
This isn't directly supported at the moment, but I think it could be added. Probably the simplest way to try it without any changes to the library would be to use CSS classes that set the z-index, such as I'm not totally sure if this will work, but if it does, then proper z-index support should be pretty easy to add. |
Beta Was this translation helpful? Give feedback.
-
Just published 0.5.2, which allows you to set the |
Beta Was this translation helpful? Give feedback.
Hm I got it to work at https://github.com/dimfeld/svelte-maplibre/blob/master/src/routes/tests/marker-z-index/%2Bpage.svelte.
Note that it doesn't work if the z-index is applied to the element inside the Marker; it has to be applied on the Marker/MarkerLayer components themselves.