layout: default title: Viewpoint parent: Core Classes —
dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Views
Viewpoint Class
Describes a point of view for a 2D or 3D view. In a 2D view, the viewpoint is determined using a center point and scale value.
In a 3D view, it is determined using a camera position.
The Viewpoint can be bookmarked for later use, or used for navigation purposes.
public class Viewpoint : dymaptic.GeoBlazor.Core.Components.MapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Viewpoint
Constructors
Viewpoint() Constructor
Parameterless constructor for use as a Blazor component.
public Viewpoint();
Viewpoint(Geometry, Nullable, Nullable) Constructor
Constructor for C# use.
public Viewpoint(dymaptic.GeoBlazor.Core.Components.Geometries.Geometry? targetGeometry=null, System.Nullable<double> scale=null, System.Nullable<double> rotation=null);
Parameters
targetGeometry
Geometry
The target geometry framed by the viewpoint.
scale
System.Nullable<System.Double>
The scale of the viewpoint.
rotation
System.Nullable<System.Double>
The rotation of due north in relation to the top of the view in degrees.
Properties
Viewpoint.Rotation Property
The rotation of due north in relation to the top of the view in degrees.
public System.Nullable<double> Rotation { get; set; }
Property Value
System.Nullable<System.Double>
Viewpoint.Scale Property
The scale of the viewpoint.
public System.Nullable<double> Scale { get; set; }
Property Value
System.Nullable<System.Double>
Viewpoint.TargetGeometry Property
The target geometry framed by the viewpoint.
public dymaptic.GeoBlazor.Core.Components.Geometries.Geometry? TargetGeometry { get; set; }
Property Value
Methods
Viewpoint.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with it’s parent.
public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The calling, child component to register
Returns
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.
Viewpoint.UnregisterChildComponent(MapComponent) Method
Undoes the “Registration” of a child with its parent.
public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The child to unregister
Returns
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.