/// <summary> /// Pans the map the specified amount /// </summary> /// <param name="lm">the layout map to pan</param> /// <param name="x">The distance to pan the map on x-axis in screen coord</param> /// <param name="y">The distance to pan the map on y-axis in screen coord</param> protected void PanMap(LayoutMap lm, float x, float y) { var mapOnScreen = PaperToScreen(lm.Rectangle); lm.PanMap((lm.Envelope.Width / mapOnScreen.Width) * x, (lm.Envelope.Height / mapOnScreen.Height) * -y); }