LuciadCPillar C# 2023.1.03
Luciad.Maps.MapNavigator.FitAction Class Reference

Class that allows to build a fit action and apply it, either directly or using an animation. More...

Inheritance diagram for Luciad.Maps.MapNavigator.FitAction:

Public Member Functions

Luciad.Maps.MapNavigator.FitAction Animate (bool animated)
 Specifies if the action should use an animation. More...
 
Luciad.Maps.MapNavigator.FitAction Bounds (Luciad.Geometries.Bounds bounds)
 Sets the bounds to fit on. More...
 
void Dispose ()
 
Luciad.Maps.MapNavigator.FitAction Duration (System.TimeSpan duration)
 Specifies the duration of the animation. More...
 
void Fit ()
 Applies the fit action. More...
 
Luciad.Maps.MapNavigator.FitAction FitMarginPercent (double fitMarginPercent)
 The fit margin is the margin between the bounds to fit on and the edge of the visible map. More...
 

Detailed Description

Class that allows to build a fit action and apply it, either directly or using an animation.

Fitting works by: defining bounds to fit to optionally defining a fit margin

Example: Execute a fit action

map.MapNavigator.NewFitAction().Bounds(bounds).FitMarginPercent(5).Fit();
Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction.

Member Function Documentation

◆ Animate()

Luciad.Maps.MapNavigator.FitAction Luciad.Maps.MapNavigator.FitAction.Animate ( bool  animated)
inline

Specifies if the action should use an animation.

animated

if this action should use an animation. The default is false.

this

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction::animate.

◆ Bounds()

Luciad.Maps.MapNavigator.FitAction Luciad.Maps.MapNavigator.FitAction.Bounds ( Luciad.Geometries.Bounds  bounds)
inline

Sets the bounds to fit on.

These bounds can be defined in any reference This parameter is mandatory. Not setting it will cause FitAction::fit to throw an exception.

bounds

the bounds to fit on

this

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction::bounds.

◆ Dispose()

void Luciad.Maps.MapNavigator.FitAction.Dispose ( )
inline

◆ Duration()

Luciad.Maps.MapNavigator.FitAction Luciad.Maps.MapNavigator.FitAction.Duration ( System.TimeSpan  duration)
inline

Specifies the duration of the animation.

This parameter is only used if animate(bool) is called with true as argument.

duration

the duration of the animation in milliseconds. The default is 2000 (=2 seconds)

this

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction::duration.

◆ Fit()

void Luciad.Maps.MapNavigator.FitAction.Fit ( )
inline

Applies the fit action.

luciad::LogicException

if the action is not built correctly, for example if mandatory parameters are missing, or if incompatible parameters are configured.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction::fit.

◆ FitMarginPercent()

Luciad.Maps.MapNavigator.FitAction Luciad.Maps.MapNavigator.FitAction.FitMarginPercent ( double  fitMarginPercent)
inline

The fit margin is the margin between the bounds to fit on and the edge of the visible map.

A fit margin of "5%" will add a margin of 5% of the map's screen dimensions on each side of the bounds, the center remains unchanged. This parameter is optional. The default fit margin is 2%.

fitMarginPercent

a fit margin, expressed as a percentage.

this

luciad::InvalidArgumentException

when a fit margin >= 50% is specified, or a value <= 0.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::FitAction::fitMarginPercent.