This project has moved and is read-only. For the latest updates, please go here.

Refresh map while dragging

Topics: General Topics, SharpMap v0.9 / v1.x, WinForms Controls
Apr 1, 2013 at 4:34 PM
I've added a tool to my application to allow points and polygons to be edited by clicking and dragging. I would like to see the polygon change while dragging. The problem I'm having is that I cannot make the MapBox refresh while the mouse button is down. I've tried with the dragged layer being set both as a variable and static layer and by calling both VariableLayerCollection.TouchTimer() and MapBox.Refresh() in the mouse move event. Monitoring the OnRefresh() event, the MapBox never refreshes until the mouse button is released.

Is this a designed behavior? Is there a way to override it to force a refresh in certain circumstances?


Apr 1, 2013 at 6:07 PM
Yes, for V1 this is by design.

We don't want to overload datasources with requests during the drag-operation, for V3 we will probably try to mimic the behavior that is for online map applications where tiles are loaded as you drag the map.

if you force the code that runs when you release the mouse button you can probably get your desired effect,

Best Regards,