I am using an InMemoryFeatureLayer to dynamically display features based on Lat/Long position.
For the sake of CPU efficiency a Refresh of the associated LayerOverlay is only invoked if the currently visible Map Extent is affected. In other words, if the update occurs out-of-view a Refresh is not done.
Because a Refresh is not performed on each Feature Update the Features are not displayed properly when the map is panned.
If the feature is within the current extent and then its Latitude is reduced outside the current extent then the feature no longer appears on the map, which is correct. As the Latitude of this feature continues to decrease it stays out-of-view, which is still correct. At this point if the map is panned the feature comes into view not once, but rather twice. The icons representing the feature correspond to the very first position where the feature went out-of-view and the last position of the feature before panning. (The first time a feature goes out-of-view a LayerOverlay Refresh is invoked since the icon should no longer appear in the current extent.)
One solution is to always Refresh the LayerOverlay, but with large numbers of dynamic features this will run the CPU at unacceptably high levels.
It seems that sometimes when the Latitude increases causing the feature to move out-of-view, followed by several move Latitude increases, followed by panning only one icon is present and it is in the proper position. But not always. Sometimes it exhibits the same symptoms as when the latitude of the feature decreases.
If a zoom-out is performed the feature is properly positioned and represented due to the fact that zoom by itself causes a LayerOverlay Refresh.
Since the out-of-view icons are positioned at the first out-of-view position and the last out-of-view position (but not inbetween first and last) that some background task of MapSuite is not doing a repaint upon start of panning. It is painting the icon at the last out-of-view position, but not the one at the first out-of-view position.
What can be done to ensure that the icons representing features are displayed and positioned correctly upon panning into view?
Any suggestions and/or assistance is appreciated.
Regards,
Dennis