View.Center Property
Gets or sets the center point of the view area.
Thread safety: This property is thread-safe.
Syntax
public Point Center { get; set; }
Property Value
Type: Point
Default: Differs depending on type. See the table below.
The center point of the view area, defined in the coordinate reference system of the view.
Default: Differs depending on type. See the table below.
The center point of the view area, defined in the coordinate reference system of the view.
Default values
Class | Default value |
---|---|
GlobeView | Not used. |
View | X: 0.0 Y: 0.0 Z: 0.0 |
Remarks
See the property Area for more information.
Example
// Sets the view to display Gothenburg area
static void CenterViewAtGothenburg(View view)
{
// The center coordinates of Gothenburg in Wgs8LongLat
Point gothenburgCenter = new Point(11.974560, 57.708870);
// Project the center coordinates of Gothenburg to the Crs of the View
gothenburgCenter = view.Crs.ProjectFromLongLat(gothenburgCenter);
// Set the Center of the View to Gothenburg
view.Center = gothenburgCenter;
// Set scale to display Gothenburg area
view.NominalScale = 500000;
// Update the View
view.Update();
}
Platforms
Windows, Linux, Android