View Class
A controller class for a 2D map presentation.
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CECore assembly)
Syntax
public class View : ResourceObject
Remarks
The View is the most central object in Carmenta Engine. It contains a description of a map presentation; typically several layers and a drawable. A View is also responsible for the geographic area and initiates updates of the presentation.
A View instance can only be used for 2D presentations. Use the GlobeView class to create 3D presentations.
A View works in the coordinate reference system specified in the Crs property. All coordinates that the view handles are defined in this coordinate reference system.
A View manages two separate lists of selected objects, one for selected features and one for selected plots. Selected features can be given special visualization by adding visualizers to the VisualizationOperator.SelectionVisualizers property. Note that the selection is a property of the view; the features or plots themselves are not affected. It is possible to show the same feature in two different views, but only selected in one of them.
Inheritance Hierarchy
System.Object (not available in C#)
EngineObject
ResourceObject
View
GlobeView
Platforms
Windows, Linux, Android
View Members
The View type has the following members.
Constructors
Name | Description |
---|---|
View | Initializes a new instance of the View class with the given drawable. |
Properties
Name | Description |
---|---|
AnimationsEnabled | Gets or sets a value that determines whether the View will render animated visualizations. |
Area | Gets or sets the geographic area displayed in the View. |
AreaMode | Gets or sets a value specifying how the view area will be adjusted to fit the aspect ratio of the drawable. |
Center | Gets or sets the center point of the view area. |
Constraints | Gets or sets the constraints that are used by the View. |
Crs | Gets or sets the coordinate reference system of the View. |
Description | Gets or sets a short description of the view. |
DisplayName | Gets or sets a display name for the view. |
DisplayStatistics | Enables or disables statistics. |
Drawable | Gets or sets the drawing area that the map will be presented at. |
Effects | List of effects |
EffectsEnabled | Gets or sets a flag that enables or disables effects for the whole configuration. |
Hover | Gets or sets the identity of the currently hovered feature. |
HoverPlot | Gets or sets the identity of the currently hovered plot. |
IsDisposed | Gets a value that tells whether the current View has been disposed. Inherited from EngineObject |
IsoMetadataDocument | Gets or sets the path to an ISO 19139 metadata document for the view. |
Layers | Gets the list of layers to be drawn in the view. |
Legend | Gets or sets a map legend associated with this view. |
Name | Gets or sets the name of the View. Inherited from ResourceObject |
NamedStyles | Gets the list of named styles that can be enabled for the view. |
NativeHandle | Gets the native Carmenta Engine kernel object the current View represents. Inherited from EngineObject |
NominalScale | Gets or sets the inverted nominal scale of the presentation. |
RenderingHint | Gets or sets hints to improve rendering in some situations. |
Rotation | Gets or sets a value specifying a rotation of the view. |
Scale | Gets or sets the inverted local scale of the presentation. |
StartPosition | Gets or sets a value indicating how the initial view area is determined. |
SunPosition | Gets or sets the position of the sun, used in 3D and by some operators. |
TerrainWarningOverlay | Gets or sets parameters that control a terrain warning overlay in the view. |
UpdateAttributes | Gets an AttributeSet defining application-specific update attributes. |
UpdateEnabled | Gets or sets a flag that enables or disables view updates. |
IUserProperties.UserProperties | Gets the AttributeSet that contains the user properties. Inherited from IUserProperties |
Width | Gets or sets the width of the view area. |
Methods
Name | Description |
---|---|
AreaForFeature | Computes a view area that is suitable for displaying the given feature. |
AreaForFeatures | Overloaded. Computes a view area that is suitable for displaying the given features. |
Clone | Creates a copy of an object. Inherited from EngineObject |
CrsToPixel | Overloaded. Transforms a position in the coordinate reference system of the View to a drawable position. |
Deselect | Overloaded. Deselects one or more features or plots in this view and updates affected areas. |
DeselectAll | Clears all features and plots from the current selection and updates the view. |
DisableThreadAccessVerification | Disables the thread access verifier for the view. |
Dispose | Releases the reference to the native Carmenta Engine kernel instance the EngineObject represents. Inherited from EngineObject |
EnableStyle | Enables or disables a named style for the view. |
Equals | Determines whether this instance is equal to another. Inherited from EngineObject |
FindChildObject | Overloaded. Finds the child object with the specified name. |
FlushCache | Flushes caches in the view. |
FlushLayersContainingObject | Calls Layer.FlushCache on all child layers that contains the object. |
GetChildObjects | Overloaded. Gets the child objects of the current object. |
GetDataBounds | Calculates the bounds of all dataset coverages in the view. |
GetLocalizedDescription | Gets a localized version of the view description in a specific language. |
GetLocalizedDisplayName | Gets a localized version of the view display name in a specific language. |
GetLocalizedIsoMetadataDocument | Gets the path to an ISO 19139 metadata document for a specific language. |
GetSelectedIds | Returns a collection that contains the identities of all selected features. |
GetSelectedPlotIds | Returns a collection that contains the identities of all selected plots. |
HasLocalizedDescription | Checks if a localized version of the view description is available in a specific language. |
HasLocalizedDisplayName | Checks if a localized version of the view display name is available in a specific language. |
HasLocalizedIsoMetadataDocument | Checks if an ISO 19139 metadata document is available for a specific language. |
IsStyleEnabled | Checks if a certain style is enabled for the view or not. |
PixelToCrs | Overloaded. Transforms a drawable position to the corresponding position in the coordinate reference system of the View. |
Select | Overloaded. Selects one or more features or plots in this View and updates affected areas. |
SetLocalizedDescription | Sets a view description in a specific language. |
SetLocalizedDisplayName | Sets a view display name in a specific language. |
SetLocalizedIsoMetadataDocument | Sets the path to an ISO 19139 metadata document for the view, for a specific language. |
SetToolTimerSettings | Required when making a MapControl. implementing IToolTimerSink. |
SetViewUpdateSettings | Required when making a MapControl. |
Update | Overloaded. Updates the map presentation. |
UpdateByMapControl | A MapControl calls this when it has received a UpdateRequired event and wants to repaint the map window. |
WhatsAt | Overloaded. Finds features presented at the specified window position. |
WhatsIn | Overloaded. Finds features presented in the specified window rectangle. |
Events
Name | Description |
---|---|
AreaChanged | Occurs when the view area has been changed. |
Busy | Occurs when the view is busy drawing or loading data. |
CustomDraw | Occurs at the end of each update cycle, but before the drawable swaps its front and back buffers. |
CustomDrawBackground | Occurs at the beginning of each update cycle, right after the drawable is cleared. |
HoverChanged | Occurs when the Hover property has been modified. |
Idle | Occurs after an update when all data has been loaded. |
SelectionChanged | Occurs when the list of selected features has been modified. |
ToolTimerElapsed | Sent to the MapControl that the view belongs to when a tool should be notified. |
Updated | Occurs at the end of each update cycle. |
UpdateRequired | Sent to the MapControl that the view belongs to when an update of the view is required. |
Updating | Occurs at the beginning of each update cycle. |