ThinkGeo.com    |     Documentation    |     Premium Support

When changing the visibility of one or more map objects, all objects re-render

When hiding individual items on the map, all items re-render which causes them to “flash” and is distracting. Using similar logic in WPF, this did not happen only the changed items were updated.
Using the attached source, select one or more items on the map and click the Hide Selected button image, all objects on the map flash and the selected objects are hidden. It would be expected that only the changed items would be affected.

Thanks,
James R.

BaseMap.zip (403.8 KB)

Hi James,

This is recreated and fixed in 15.0.0-beta154. Nothing needs to change in your project.

What you will see:

Hiding, showing or restyling through RedrawAsync() no longer blanks the map. The old picture stays up and the new one takes its place in a single step once it is ready.

It is not instantaneous: the server still has to draw the new tiles and send them, so there is a short delay before your change appears. The map simply does not go dark during it.

One thing worth changing on your side

A single “Hide Selected Shapes” currently costs three tile refills across two overlays:

  1. ChangeFeaturesVisibilityByIdAsync → ApplyVisibilityChangeAsync → RefreshSelectionHighlightAsync() redraws DynamicOverlay
  2. the same method then redraws FeaturesOverlay
  3. ClearSelectionAsync() immediately after redraws DynamicOverlay a second time

Step 1 recomputes the selection highlight and step 3 discards it two lines later. If you clear the selection before the visibility change rather than after it, you are down to two refills and the update lands sooner.

Give beta154 a try and let us know if it works for you. And FYI: if you need to manipulate features continuously — dragging, toggling, restyling while the user works — a server-drawn tile overlay is the wrong tool for those, since every change is a round trip to the server. We are looking at a client-side vector overlay for that case and that will be more responsive.

Thanks,
Ben

Ben,

I will give it a try as is and we definitely need to be able to drag and drop, hide/show, etc. and also perform a playback which will move multiple features on the map over time based on the data. I am currently writing a method to update the map now over time for the playback.

I think the vector overlay would be the best option for the moving features and then we would send the data changes to the server for other users to get the updates. We are still working out how collaboration is going to work.

Thanks,
James R.

Ben,

I just tried the last build and that works much better. on hiding and showing the objects. I will work on playback as is and see what that looks like.

Thanks,

James R.