Skip to content

HomeMapTool

Namespace: ThinkGeo.UI.Blazor

Displays a button which restores a configured map center, zoom, bearing and pitch.

public class HomeMapTool : MapTool, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleEvent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable

Inheritance object → ComponentBase → MapTool → HomeMapTool
Implements IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Properties

Location

Gets or sets the corner where the home button is displayed.

public ZoomBarLocation Location { get; set; }

Property Value

ZoomBarLocation

OffsetX

Gets or sets the horizontal distance from the selected corner, in pixels.

public int OffsetX { get; set; }

Property Value

int

OffsetY

Gets or sets the vertical distance from the selected corner, in pixels.

public int OffsetY { get; set; }

Property Value

int

Center

Gets or sets the center restored by the button. The map's initial center is used when null.

public PointShape Center { get; set; }

Property Value

PointShape

Zoom

Gets or sets the zoom level restored by the button. The map's initial zoom is used when null.

public Nullable<int> Zoom { get; set; }

Property Value

Nullable<int>

Scale

Gets or sets the scale restored by the button. When set, it takes precedence over Zoom.

public Nullable<double> Scale { get; set; }

Property Value

Nullable<double>

Bearing

Gets or sets the bearing restored by the button. The map's initial bearing is used when null.

public Nullable<double> Bearing { get; set; }

Property Value

Nullable<double>

Pitch

Gets or sets the pitch restored by the button. The map's initial pitch is used when null.

public Nullable<double> Pitch { get; set; }

Property Value

Nullable<double>

Id

Gets or sets the unique identifier used to track this tool. Defaults to a new GUID.

public string Id { get; set; }

Property Value

string

Constructors

HomeMapTool()

public HomeMapTool()

Methods

OnInitialized()

Registers the home button with the parent map before rendering begins.

protected void OnInitialized()

Returns

void