예제 #1
0
 /// <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>
 public void PanMap(LayoutMap lm, float x, float y)
 {
     RectangleF mapOnScreen = PaperToScreen(lm.Rectangle);
     lm.PanMap((lm.Envelope.Width / mapOnScreen.Width) * x, (lm.Envelope.Height / mapOnScreen.Height ) * -y);
 }
예제 #2
0
 /// <summary>
 /// Zooms the map element to the full extent of its layers
 /// </summary>
 public static void ZoomFullExtentMap(LayoutMap lm)
 {
     lm.ZoomToFullExtent();
 }
예제 #3
0
 /// <summary>
 /// Zoom the map to the extent of the data view
 /// </summary>
 public static void ZoomFullViewExtentMap(LayoutMap lm)
 {
     lm.ZoomViewExtent();
 }
예제 #4
0
 /// <summary>
 /// Zooms the map element out by 10%
 /// </summary>
 public static void ZoomOutMap(LayoutMap lm)
 {
     double tenPerWidth = (lm.Envelope.Maximum.X - lm.Envelope.Minimum.X) / 20;
     double tenPerHeight = (lm.Envelope.Maximum.Y - lm.Envelope.Minimum.Y) / 20;
     Geometries.Envelope envl = new Geometries.Envelope();
     envl.Minimum.X = lm.Envelope.Minimum.X - tenPerWidth;
     envl.Minimum.Y = lm.Envelope.Minimum.Y - tenPerHeight;
     envl.Maximum.X = lm.Envelope.Maximum.X + tenPerWidth;
     envl.Maximum.Y = lm.Envelope.Maximum.Y + tenPerWidth;
     lm.Envelope = envl;
 }