Moving of the Map does not work

Jan 16, 2013 at 2:54 PM

I have set the the function mode of my map to Pan:

uxMap.FunctionMode = DotSpatial.Controls.FunctionMode.Pan;

then I am able to zoom in, to zoom out, and to move the map using the mouse and its wheel.  

Then if I move a layer changing the coordinate of a featureset:

myLabelLayer.FeatureSet.GetFeature(0).Coordinates[0] =newCoordinateLocation;

it happen that I am still able to zoom in, to zoom out the map but I am not anymore able to move the map with the mouse.

Can someone help me to understand what I am doing wrong?

thanks in advance.

Jan 16, 2013 at 3:46 PM
Edited Jan 16, 2013 at 3:46 PM

I have discovered the SetCenter functions, using it I have been able to solve my issue:

uxMap.ViewExtents.SetCenter(uxMap.ViewExtents.Center - (this.CurrentLocation -this.PreviousLocation));