View.NominalScale Property
Gets or sets the inverted nominal scale of the presentation.
Syntax
public System.Double NominalScale { get; set; }
Property Value
Default: Differs depending on type. See the table below.
The inverted nominal scale of the presentation. E.g. for a scale of 1:10000, specify 10000.
Default values
Class | Default value |
---|---|
GlobeView | Not used. |
View | 0.0 |
Remarks
This property sets the nominal scale of the presentation. The nominal scale does not depend on the geographic position. It is useful only in 2D.
There are several other ways to specify the area to view, see Area.
This property uses Drawable.ScreenPixelSize to calculate the physical size of the Drawable.
Example
// The nominal scale specifies the inverse scale at the center of the used CRS
// Zoom in by decreasing the current inverse nominal scale
static void ZoomIn(View view)
{
// Decrease the current inverse nominal scale
view.NominalScale = view.NominalScale / 2.0;
// Update the View
view.Update();
}
// Zoom out by increasing the current inverse nominal scale
static void ZoomOut(View view)
{
// Increase the current inverse nominal scale
view.NominalScale = view.NominalScale * 2.0;
// Update the View
view.Update();
}
Platforms
Windows, Linux, Android