This project has moved. For the latest updates, please go here.

Freezable MapBase Transforms

Nov 9, 2015 at 8:11 PM
Hi,

My app is showing at least 10 map controls with a lot of drawn objects so I am looking to move the rendering off to background threads (via Direct2D) and need access to the current ViewportTransform. I am trying to avoid the need to perform a dispatcher thread sync at the beginning of each frame render to get the ViewportTransform. Is it possible to adjust the MapBase to Freeze the ViewportTransform (would need to be replaced on each viewport update)?

Thanks,
Richard.
Coordinator
Nov 10, 2015 at 6:54 AM
That would be a breaking change. There may be lots of elements holding a reference to the ViewportTransform instance. These would all have to be replaced by bindings.

How about deriving from the Map control and creating your own frozen Transform object?
Nov 10, 2015 at 12:11 PM
Agreed. I'll derive from MapBase and override OnViewportChanged() to clone and freeze a copy of the ViewportTransform.

Thanks.
Marked as answer by ClemensF on 11/13/2015 at 10:42 AM