question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MapView: ordering of layers

See original GitHub issue

In the Mapsui.UI.Forms.MapView, the ordering of layers is the following:

  1. user layers (base maps + overlays)
  2. drawables
  3. pins
  4. callouts
  5. mylocation

From my point of view, there are two issues with this:

  1. Mylocation is on top of everything else (possibly hiding drawables, pins & callouts, which I find kind of unnatural)
  2. The ordering cannot be changed (any more), since the original ordering is restored in MapView.HandleLayers.

Before v3, changing the ordering was possible, and in fact I used to do this via Map.Layers.Move. Since #1185 was merged, this does not work any more. The ordering is always restored in MapView.HandleLayers.

There are two possible solutions that would fix this for me:

  1. Change the default ordering so that mylocation is below the drawables, pins & callouts.
  2. Have a way to change the default ordering.

Which one would be preferable?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
januswcommented, Feb 15, 2022

This issue is fixed by #1494 for me. I think it still makes sense to introduce further improvements like layer groups, which should be discussed in #1491.

0reactions
januswcommented, Feb 15, 2022

Ok, from my side I see no problem. Should work. And if it helps.

Alright, it would definitely help me. I just submitted it as PR #1494.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flipping mapview layer viewing order · Issue #248 · r-spatial ...
I was wondering if it's possible to switch to viewing order of layers created from mapView(rasterStack)? If I understand correctly, ...
Read more >
Move or reorder layers in mapview
Anybody with good hints or tips regarding how to re-order layers? I want to be able to have an option that changes the...
Read more >
The order of the layers in ArcGIS Online Map Viewer is ...
However, adding the web map containing map services or map image layers to ArcGIS Web AppBuilder displays a different order of the layers...
Read more >
r - How to always keep a specific layer in the background in ...
Instead of using mapview which is an API for leaflet , you could use leaflet directly. leaflet allows to add Panes to control...
Read more >
Organize layers (Map Viewer Classic)—ArcGIS Online Help
You can rename, remove, and change the order of layers in a map.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found