I have an issue with LayerOverlay in case where I initially don’t have any layers in it’s Layers collection.
Let’s assume I have the background overlay with a world shape layer on it and nothing else. After I add an overlay that has no layers, then any map interaction (e.g. zoom in/out) “flickers” the background overlay. I think it updates & draws the empty overlay. So for brief moment background is “invisible” and only background color is shown.
If I later add layers to this empty overlay, it won’t refresh/redraw the overlay if map is not panned or zoomed. I have tried to refresh the overlay and call Map.Refresh(). Both have no effect. If overlay had layers initially these refresh functions works as intented.
Why this is an issue?
It seems adding and removing layers from an existing overlay is much more performant than removing and adding the overlay again to the map control (which is what I need to do now).