public override IEnvelope Extent
{
get
{
m_extent = GetLayerExtent();
if (null == m_extent )
return null;
IEnvelope env = ((IClone)m_extent ).Clone() as IEnvelope;
if(null != m_layerSpatialRef)
env.Project(m_layerSpatialRef);
return env;
}
}
private IEnvelope GetLayerExtent()
{
if (null == base.m_spRef)
{
base.m_spRef = CreateGeographicSpatialReference();
}
IEnvelope env = new EnvelopeClass();
env.SpatialReference = base.m_spRef;
IPoint point = new PointClass();
point.SpatialReference = m_spRef;
foreach (DataRow r in m_table.Rows)
{
point.Y = Convert.ToDouble(r["Y"]);
point.X = Convert.ToDouble(r["X"]);
env.Union(point.Envelope);
}
return env;
}
System.Drawing.Icon dotNetIcon = new System.Drawing.Icon(@"C:\Temp\MyIcon.ico");
ESRI.ArcGIS.MapControl.IMapControlDefault map = this.axMapControl1.Object as ESRI.ArcGIS.MapControl.IMapControlDefault;
map.MouseIcon = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromIcon(dotNetIcon) as stdole.IPictureDisp;
map.MousePointer = ESRI.ArcGIS.SystemUI.esriControlsMousePointer.esriPointerCustom;
Dim dotNetIcon As System.Drawing.Icon = New System.Drawing.Icon("C:\Temp\MyIcon.ico")
Dim map As ESRI.ArcGIS.MapControl.IMapControlDefault = Me.AxMapControl1.Object
map.MouseIcon = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromIcon(dotNetIcon)
map.MousePointer = ESRI.ArcGIS.SystemUI.esriControlsMousePointer.esriPointerCustom
System.Drawing.Bitmap dotNetBmp = new System.Drawing.Bitmap(@"C:\Temp\MyBitmap.bmp");
ESRI.ArcGIS.Display.IPictureMarkerSymbol bmpSym = new ESRI.ArcGIS.Display.PictureMarkerSymbolClass() as ESRI.ArcGIS.Display.IPictureMarkerSymbol;
bmpSym.Picture = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromBitmap(dotNetBmp) as stdole.IPictureDisp;
Dim dotNetBmp As System.Drawing.Bitmap = New System.Drawing.Bitmap("C:\Temp\MyBitmap.bmp")
Dim bmpSym As ESRI.ArcGIS.Display.IPictureMarkerSymbol = New ESRI.ArcGIS.Display.PictureMarkerSymbol
bmpSym.Picture = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromBitmap(dotNetBmp)
System.Drawing.Font dotNetFont = new System.Drawing.Font("Castellar", 25.0F);
ESRI.ArcGIS.Display.ITextSymbol textSym = new ESRI.ArcGIS.Display.TextSymbolClass() as ESRI.ArcGIS.Display.ITextSymbol;
textSym.Font = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIFontDispFromFont(dotNetFont) as stdole.IFontDisp;
Dim dotNetFont As New System.Drawing.Font("Castellar", 25.0F)
Dim textSym As ESRI.ArcGIS.Display.ITextSymbol = New ESRI.ArcGIS.Display.TextSymbolClass
textSym.Font = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIFontDispFromFont(dotNetFont)
public override IEnvelope Extent
{
get
{
m_extent = GetLayerExtent();
if (null == m_extent )
return null;
IEnvelope env = ((IClone)m_extent ).Clone() as IEnvelope;
return env;
}
}
private IEnvelope GetLayerExtent()
{
if (null == base.m_spRef)
{
base.m_spRef = CreateGeographicSpatialReference();
}
IEnvelope env = new EnvelopeClass();
env.SpatialReference = base.m_spRef;
IPoint point = new PointClass();
point.SpatialReference = m_spRef;
foreach (DataRow r in m_table.Rows)
{
point.Y = Convert.ToDouble(r[3]);
point.X = Convert.ToDouble(r[4]);
env.Union(point.Envelope);
}
return env;
}
public override IEnvelope Extent
{
get
{
m_extent = GetLayerExtent();
if (null == m_extent )
return null;
IEnvelope env = ((IClone)m_extent ).Clone() as IEnvelope;
if(null != m_layerSpatialRef)
env.Project(m_mapSpatialRef);
return env;
}
}
private IEnvelope GetLayerExtent()
{
if (null == base.m_spRef)
{
base.m_spRef = CreateGeographicSpatialReference();
}
IEnvelope env = new EnvelopeClass();
env.SpatialReference = base.m_spRef;
IPoint point = new PointClass();
point.SpatialReference = m_spRef;
foreach (DataRow r in m_table.Rows)
{
point.Y = Convert.ToDouble(r["Y"]);
point.X = Convert.ToDouble(r["X"]);
env.Union(point.Envelope);
}
return env;
}