C# Class RSSWeatherLayer3D.GlobeCustomLayerBase

An abstract base class for implementation of a custom globe layer
Inheritance: System.Windows.Forms.Control, ILayer, IGeoDataset, ILayerGeneralProperties, IPersistVariant, IPersistStream, ILayerExtensions, ILayerInfo, ILegendInfo, ILayerDrawingProperties, ICustomGlobeLayer, IEnumerable, IDisposable
显示文件 Open project: Esri/arcobjects-sdk-community-samples

Protected Properties

Property Type Description
m_ShowTips bool
m_bCached bool
m_bDrawDirty bool
m_bValid bool
m_bVisible bool
m_dblMaxScale double
m_dblMinScale double
m_extensions System.Collections.ArrayList
m_extent IEnvelope
m_hLargeBitmap System.IntPtr
m_hSmallBitmap System.IntPtr
m_largeBitmap System.Drawing.Bitmap
m_legendGroup ILegendGroup
m_sName string
m_smallBitmap System.Drawing.Bitmap
m_spRef ISpatialReference
m_table System.Data.DataTable

Private Properties

Property Type Description
DeleteObject int

Public Methods

Method Description
AddExtension ( object ext ) : void

Adds a new extension.

AddItem ( DataRow row ) : void

Add an item to the layer

AddItem ( object values ) : void

Add an item to the Layer

Clear ( ) : void

Remove all items in the layer

Dispose ( ) : void

Dispose the layer

Draw ( esriDrawPhase drawPhase, IDisplay Display, ITrackCancel trackCancel ) : void

Draws the layer to the specified display for the given draw phase.

This method draws the layer to the Display for the specified DrawPhase. Use the TrackCancel object to allow the drawing of the layer to be interrupted by the user.

DrawImmediate ( IGlobeViewer pGlobeViewer ) : void

For custom OpenGL layers, perform immediate drawing.

This is where you should add your drawings on the Globe. This method must be overridden in your inheriting class. DrawImmediate together with IGlobeDisplayEvents::BeforeDraw and IGlobeDisplayEvents::AfterDraw is the only safe place where the OpenGL state is ready for custom actions.

GetClassID ( System.Guid &pClassID ) : void

Returns the class identifier (CLSID) for the component object.

GetEnumerator ( ) : IEnumerator

Allow users to directly enumerate through the layer's records

GetSizeMax ( _ULARGE_INTEGER &pcbSize ) : void

Return the size in bytes of the stream needed to save the object.

GetTile ( int tilesize, int face, int level, int row, int col, byte &pData ) : void

Gets a rasterized data tile for the given globe tesselation coordinates.

GlobeCustomLayerBase ( ) : System

Class default constructor

Hit ( int hitObjectID, ESRI pHit3D ) : void

The layer is hit by a picking operation.

IsDirty ( ) : void

Checks the object for changes since it was last saved.

Load ( IStream pstm ) : void

Initializes an object from the stream where it was previously saved.

Load ( IVariantStream Stream ) : void

Loads the object properties from the stream.

The Load method must read the data from the stream in the same order the data was written to the stream in the Save method. Streams are sequential; you must ensure that your data is saved and loaded in the correct order, so that the correct data is written to the correct member.

NewItem ( ) : DataRow

Create a new item (does not add it to the layer)

RemoveExtension ( int Index ) : void

Removes the specified extension.

RemoveItem ( DataRow row ) : void

Remove the item from the layer

Save ( IStream pstm, int fClearDirty ) : void

Saves an object into the specified stream and indicates whether the object should reset its dirty flag.

Save ( IVariantStream Stream ) : void

Saves the object properties to the stream.

Select ( string queryFilter ) : System.Data.DataRow[]

Query for items in the layer

get_Extension ( int Index ) : object

The extension at the specified index.

get_LegendGroup ( int Index ) : ILegendGroup

Legend group at the specified index.

The content and number of legend groups is determined by the implementation of the renderer, consequently this property is read only.

get_TipText ( double X, double Y, double Tolerance ) : string

Map tip text at the specified location.

this ( int index ) : DataRow

Indexer, returns the underlying DataRow for the given index

Private Methods

Method Description
DeleteObject ( IntPtr hObject ) : int

Method Details

AddExtension() public method

Adds a new extension.
public AddExtension ( object ext ) : void
ext object
return void

AddItem() public method

Add an item to the layer
public AddItem ( DataRow row ) : void
row System.Data.DataRow
return void

AddItem() public method

Add an item to the Layer
public AddItem ( object values ) : void
values object
return void

Clear() public method

Remove all items in the layer
public Clear ( ) : void
return void

Dispose() public method

Dispose the layer
public Dispose ( ) : void
return void

Draw() public method

Draws the layer to the specified display for the given draw phase.
This method draws the layer to the Display for the specified DrawPhase. Use the TrackCancel object to allow the drawing of the layer to be interrupted by the user.
public Draw ( esriDrawPhase drawPhase, IDisplay Display, ITrackCancel trackCancel ) : void
drawPhase esriDrawPhase
Display IDisplay
trackCancel ITrackCancel
return void

DrawImmediate() public abstract method

For custom OpenGL layers, perform immediate drawing.
This is where you should add your drawings on the Globe. This method must be overridden in your inheriting class. DrawImmediate together with IGlobeDisplayEvents::BeforeDraw and IGlobeDisplayEvents::AfterDraw is the only safe place where the OpenGL state is ready for custom actions.
public abstract DrawImmediate ( IGlobeViewer pGlobeViewer ) : void
pGlobeViewer IGlobeViewer
return void

GetClassID() public method

Returns the class identifier (CLSID) for the component object.
public GetClassID ( System.Guid &pClassID ) : void
pClassID System.Guid
return void

GetEnumerator() public method

Allow users to directly enumerate through the layer's records
public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetSizeMax() public method

Return the size in bytes of the stream needed to save the object.
public GetSizeMax ( _ULARGE_INTEGER &pcbSize ) : void
pcbSize _ULARGE_INTEGER
return void

GetTile() public method

Gets a rasterized data tile for the given globe tesselation coordinates.
public GetTile ( int tilesize, int face, int level, int row, int col, byte &pData ) : void
tilesize int
face int
level int
row int
col int
pData byte
return void

GlobeCustomLayerBase() public method

Class default constructor
public GlobeCustomLayerBase ( ) : System
return System

Hit() public method

The layer is hit by a picking operation.
public Hit ( int hitObjectID, ESRI pHit3D ) : void
hitObjectID int
pHit3D ESRI
return void

IsDirty() public method

Checks the object for changes since it was last saved.
public IsDirty ( ) : void
return void

Load() public method

Initializes an object from the stream where it was previously saved.
public Load ( IStream pstm ) : void
pstm IStream
return void

Load() public method

Loads the object properties from the stream.
The Load method must read the data from the stream in the same order the data was written to the stream in the Save method. Streams are sequential; you must ensure that your data is saved and loaded in the correct order, so that the correct data is written to the correct member.
public Load ( IVariantStream Stream ) : void
Stream IVariantStream
return void

NewItem() public method

Create a new item (does not add it to the layer)
public NewItem ( ) : DataRow
return System.Data.DataRow

RemoveExtension() public method

Removes the specified extension.
public RemoveExtension ( int Index ) : void
Index int
return void

RemoveItem() public method

Remove the item from the layer
public RemoveItem ( DataRow row ) : void
row System.Data.DataRow The row to remove
return void

Save() public method

Saves an object into the specified stream and indicates whether the object should reset its dirty flag.
public Save ( IStream pstm, int fClearDirty ) : void
pstm IStream
fClearDirty int
return void

Save() public method

Saves the object properties to the stream.
public Save ( IVariantStream Stream ) : void
Stream IVariantStream
return void

Select() public method

Query for items in the layer
public Select ( string queryFilter ) : System.Data.DataRow[]
queryFilter string WHERE clause
return System.Data.DataRow[]

get_Extension() public method

The extension at the specified index.
public get_Extension ( int Index ) : object
Index int
return object

get_LegendGroup() public method

Legend group at the specified index.
The content and number of legend groups is determined by the implementation of the renderer, consequently this property is read only.
public get_LegendGroup ( int Index ) : ILegendGroup
Index int
return ILegendGroup

get_TipText() public method

Map tip text at the specified location.
public get_TipText ( double X, double Y, double Tolerance ) : string
X double
Y double
Tolerance double
return string

this() public method

Indexer, returns the underlying DataRow for the given index
public this ( int index ) : DataRow
index int
return System.Data.DataRow

Property Details

m_ShowTips protected_oe property

determines whether the layers is supposed to show its MapTips
protected bool m_ShowTips
return bool

m_bCached protected_oe property

determines whether the layers is cached. Returned by ILayer::Cached.
protected bool m_bCached
return bool

m_bDrawDirty protected_oe property

Indicates if the layer drawing properties are dirty.
protected bool m_bDrawDirty
return bool

m_bValid protected_oe property

Flag which determines whether the layer is valid (connected to its data source, has valid information etc.). Returned by ILAyer::Valid.
You can use this flag to determine for example whether the layer can be available or not.
protected bool m_bValid
return bool

m_bVisible protected_oe property

Flag which determines whether the layers is visible. Returned by ILayer::Visible
You should use this member in your inherited class in the Draw method.
protected bool m_bVisible
return bool

m_dblMaxScale protected_oe property

Keep the maximum scale value at which the layer will display
protected double m_dblMaxScale
return double

m_dblMinScale protected_oe property

Keep the minimum scale value at which the layer will display
protected double m_dblMinScale
return double

m_extensions protected_oe property

An arraylist to store the layer's extensions.
protected ArrayList,System.Collections m_extensions
return System.Collections.ArrayList

m_extent protected_oe property

Keep the layer's extent. Returned by the ILayer::Extent property
The extent should be spatial-referenced to the DateFrame's spatial reference.
protected IEnvelope m_extent
return IEnvelope

m_hLargeBitmap protected_oe property

Handle for the large bitmap
protected IntPtr,System m_hLargeBitmap
return System.IntPtr

m_hSmallBitmap protected_oe property

Handle for the small bitmap
protected IntPtr,System m_hSmallBitmap
return System.IntPtr

m_largeBitmap protected_oe property

The bitmap which represent the large image of the layer.
This image will be shown in ArcCatalog when in Thumbnail view
protected Bitmap,System.Drawing m_largeBitmap
return System.Drawing.Bitmap

m_legendGroup protected_oe property

The legend group to store the legend class required by the TOC for the layer's renderer. Returned by ILegendGroup::get_LegendGroup property.
protected ILegendGroup m_legendGroup
return ILegendGroup

m_sName protected_oe property

Layer's name. Returned by ILayer::Name property
protected string m_sName
return string

m_smallBitmap protected_oe property

The bitmap which represent the small image of the layer.
Shown in ArcCatalog or in the identify dialog
protected Bitmap,System.Drawing m_smallBitmap
return System.Drawing.Bitmap

m_spRef protected_oe property

Store the layer's underlying data spatial reference. Returned by IGeoDataset::SpatialReference.
This spatial reference should not be reprojected. In your inheriting class you will need to have another parameter that will keep the DataFrame's spatial reference that would use to reproject the geometries and the extent of the layer.
protected ISpatialReference m_spRef
return ISpatialReference

m_table protected_oe property

The data structure for the custom layer
By default, the DataTable gets initialized in the BaseClass Ctor with an ID column which is AutoIncremented. The BaseClass also support enumerator which is actually en enumerator of the table as well as a direct indexer.
protected DataTable,System.Data m_table
return System.Data.DataTable