MapWinGIS:AxMap AdjustLayerExtents

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

AdjustLayerExtents

Adjusts an image layer's extents after a programatic change of XllCenter, YllCenter, dX or dY.


C# Usage

Sub AdjustLayerExtents(int layerHandle)

            Parameters

layerHandle

The layer handle (integer) returned on AddLayer.

Sample Code

                
  bool res;
  int layerHandle;
  MapWinGIS.Image img = new MapWinGIS.Image();
  openFileDialog1.ShowDialog();
  res = img.Open(openFileDialog1.FileName.ToString(), MapWinGIS.ImageType.USE_FILE_EXTENSION,false, null);
  if (!res)
     MessageBox.Show(img.get_ErrorMsg(img.LastErrorCode));
  img.XllCenter = 200;
  img.YllCenter = 200;
  layerHandle = axMap1.AddLayer(img, true);
  axMap1.AdjustLayerExtents(layerHandle);
  axMap1.Redraw();
  

Back to MapWinGIS.Map

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:AxMap_AdjustLayerExtents"

This page has been accessed 448 times. This page was last modified on 30 November 2009, at 07:13.