I have a real time (ship tracking) application that can track a few hundred ships at once, so performance is all important - I want the users to be able to pan and zoom smoothly while the screen is continually being updated by data being placed into a SQL Server database which MapSuite Desktop Edition reads and puts on the maps.
Previously I was performing the following command:
WinformsMap1.Refresh()
every second (triggered by a timer) but the performance was not good - too much refreshing.
I found that I didn't actually need to do a full refresh but could just do this command:
WinformsMap1.Refresh(DynamicLayerOverlay)
where DynamicLayerOverlay consists of 3 layers:
DynamicLayerOverlay.Layers.Add("ShipLayer", ShipLayer)
DynamicLayerOverlay.Layers.Add("TrailLayer", TrailLayer)
DynamicLayerOverlay.Layers.Add("TrailLayer2", TrailLayer2)
as shown in the screen dump below - ShipLayer is the green ship (actually a helicopter making a delivery to a moving ship in this case!) while TraiLayer is the trail "dots" and TrailLayer2 is the trail "lines"
So, every 1 cycle the WinformsMap1.Refresh(DynamicLayerOverlay) is definitely being called. However, as can be seen in the above screen dump, sometimes the vessel draws as a new shape in the new location but doesn't clear the old vessel. The helicopter landed up in the north west corner of the map but then took off again as can be seen by the trail and the correct location is the one in the south east corner of the map.
Any idea why the refresh isn't working properly? If I just pan the map even a couple of milimetres manually the old, incorrect vessel disappears and the map is as it should be.
I am using MapSuiteCore:5.5.0.91, DesktopEdition:5.5.0.91. I haven't started with V6 yet but haven't seen any indication that this part of the code has been worked on...