Class FitOptions
java.lang.Object
io.jmix.mapsflowui.component.model.FitOptions
Describes options for
GeoMap.fit(FitOptions)
method.
For more details see: View#fit() docs
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFitOptions
(Extent target) Creates an instance with extent as target object to zoom to.FitOptions
(Feature target) Optional constructor.FitOptions
(org.locationtech.jts.geom.Geometry target) Creates an instance with geometry as target object to zoom to. -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.geom.Geometry
getSize()
withDuration
(Integer duration) Sets the duration of the animation in milliseconds.withEasing
(Easing easing) Sets the easing function used during the animation.withMaxZoom
(Double maxZoom) Sets the maximum zoom level that zoom to.withPadding
(Padding padding) Sets the padding to be cleared inside the view.Sets the size in pixels of the box to fit the extent or geometry into.
-
Field Details
-
extent
-
geometry
protected org.locationtech.jts.geom.Geometry geometry -
size
-
padding
-
duration
-
maxZoom
-
easing
-
-
Constructor Details
-
FitOptions
Creates an instance with extent as target object to zoom to.- Parameters:
target
- extent
-
FitOptions
Optional constructor. Creates an instance with geometry as target object to zoom to from provided feature.- Parameters:
target
- feature from which is taken geometry
-
FitOptions
public FitOptions(org.locationtech.jts.geom.Geometry target) Creates an instance with geometry as target object to zoom to.- Parameters:
target
- geometry
-
-
Method Details
-
getSize
- Returns:
- size of the box to fit the extent or geometry into or
null
if not set
-
withSize
Sets the size in pixels of the box to fit the extent or geometry into. The map size is used by default.- Parameters:
size
- the size in pixels- Returns:
- current instance
-
getPadding
- Returns:
- padding or
null
if not set
-
withPadding
Sets the padding to be cleared inside the view.- Parameters:
padding
- padding to set- Returns:
- current instance
-
getDuration
- Returns:
- the duration or
null
if not set
-
withDuration
Sets the duration of the animation in milliseconds.Note, there is no animation to the target extent or geometry by default
- Parameters:
duration
- duration in milliseconds- Returns:
- current instance
-
getMaxZoom
- Returns:
- maximum zoom level or
null
if not set
-
withMaxZoom
Sets the maximum zoom level that zoom to.- Parameters:
maxZoom
- maximum zoom level- Returns:
- current instance
-
getEasing
- Returns:
- easing function or
null
if not set
-
withEasing
Sets the easing function used during the animation. The default isEasing.IN_AND_OUT
).- Parameters:
easing
- animation type- Returns:
- current instance
-
getExtent
- Returns:
- extent if options created using by
FitOptions(Extent)
constructor otherwise returnsnull
-
getGeometry
public org.locationtech.jts.geom.Geometry getGeometry()- Returns:
- geometry if options created using by
FitOptions(Geometry)
orFitOptions(Feature)
constructor otherwise returnsnull
-