Show / Hide Table of Contents

Class ScaleLine

The ScaleLine Control generates a line representing a certain distance on the map in both Metric and US units.

Inheritance
Object
ScaleLine
Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public class ScaleLine : TemplatedView

Constructors

| Improve this Doc View Source

ScaleLine()

Initializes a new instance of the ScaleLine class.

Declaration
public ScaleLine()

Fields

| Improve this Doc View Source

ColorProperty

Identifies the Color bindable property.

Declaration
public static readonly BindableProperty ColorProperty
Field Value
Type Description
BindableProperty
| Improve this Doc View Source

MapScaleProperty

Identifies the MapScale bindable property.

Declaration
public static readonly BindableProperty MapScaleProperty
Field Value
Type Description
BindableProperty
| Improve this Doc View Source

MapViewProperty

Identifies the Dependency Property.

Declaration
public static readonly BindableProperty MapViewProperty
Field Value
Type Description
BindableProperty
| Improve this Doc View Source

TargetWidthProperty

Identifies the TargetWidth bindable property.

Declaration
public static readonly BindableProperty TargetWidthProperty
Field Value
Type Description
BindableProperty

Properties

| Improve this Doc View Source

Color

Gets or sets the Color that will be used for the scale line parts.

Declaration
public Color Color { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

MapScale

Gets or sets the scale that the ScaleLine will use to calculate scale in metric and imperial units.

Declaration
public double MapScale { get; set; }
Property Value
Type Description
Double
See Also
MapView
| Improve this Doc View Source

MapView

Gets or sets the MapView property that can be attached to a ScaleLine control to accurately set the scale, instead of setting the MapScale property directly.

Declaration
public MapView? MapView { get; set; }
Property Value
Type Description
Nullable<MapView>
| Improve this Doc View Source

TargetWidth

Gets or sets the width that will be used to calculate the length of the ScaleLine.

Declaration
public double TargetWidth { get; set; }
Property Value
Type Description
Double

Methods

| Improve this Doc View Source

CalculateScale(Nullable<Geometry.Polygon>, Double)

Calculates the scale at the center of a polygon, at a given pixel size.

Declaration
public static double CalculateScale(Geometry.Polygon? visibleArea, double unitsPerPixel)
Parameters
Type Name Description
Nullable<Geometry.Polygon> visibleArea

The area which center the scale will be calculated for.

Double unitsPerPixel

The size of a device indepedent pixel in the units of the spatial reference.

Returns
Type Description
Double

The MapScale for the center of the view.

Remarks

A pixel is a device independent logical pixel - ie 1/96 inches.

| Improve this Doc View Source

OnApplyTemplate()

Declaration
protected override void OnApplyTemplate()
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX