(i) button A: Clear internal features on InMemoryFeatureLayer. Then, add 3 new point on InMemoryFeatureLayer in Location A. After that, zoom to Location A by using InMemoryFeatureLayer.FeatureSource.GetBoundingBox().
(ii) button B: Clear internal features on InMemoryFeatureLayer. Then, add 4 new point on InMemoryFeatureLayer in Location B. After that, zoom to Location B by using InMemoryFeatureLayer.FeatureSource.GetBoundingBox().
First, press the button A. The map show or zoom to location A with 3 points. After that, press button B, the map zoom at location B with 4 points. Then repeat press the button A, the map show 3 points but the layer NOT Refresh. It still show the location B with 3 points? if i pan the map, the map will refresh to location A with 3 points.
We made a sample based on your code and full tested it, it works fine both in latest version and RC 3.0.307. Attachments contain some screenshots for different button click as well as the sample we used.
Let me know if you have problems with the sample attached, I guess you are using the version 3.0.307 RC.
I have shape file as my background image in map. Location for each point render from Location A and Location B is correct.
The problem is the background image not render properly. When i repeat the same step for location A to location B and back to location A, the shape file layer not render properly. For example, When i press location B, all the point render correct, but the background shape file still maintance in background A in location A. If i drag or move my image, then the background will refresh to background B in location B. Can anybody help me why my background map not refresh properly?
As i noticed, after success render the map in button 1 or button 2, if i drag or move the map, it will doing a refresh on map and seen like clear all my point and redraw. But if i drag or move the map again, then i dont see any resfresh on the map like clear all the point and redraw. may i know this is the behaviour of the map?
About the background image not render properly problem, this is a known issue for the latest public release version 3.0.307. We have solved this problem in the latest version and you can use it when the next public release.
About your second question, this behavior is normal for the WnformsMap control. We have a local cache system build in the map control, and it will be cleared if you call redraw on the map. So the local cache will be generated again when you drag the map after redraw it. Then if you drag and move the map again, the map will just use the local cache and needs not to redraw.