lookAtPoints method - MapCameraUpdateFactory class - mapview library - Dart API
lookAtPoints static method
- List<
GeoCoordinates> points, - Rectangle2D viewRectangle,
- GeoOrientationUpdate orientation,
- MapMeasure measureLimit,
Create an update to look at the given geo locations and fit them inside the given rectangle, in accordance with a map measure limit.
If the provided MapCameraUpdateFactory.lookAtPoints.points list is empty, no update will be applied to the camera.
If the MapCameraUpdateFactory.lookAtPoints.viewRectangle parameter is invalid, fully or partially outside the map view,
then the entire map viewport will be used as MapCameraUpdateFactory.lookAtPoints.viewRectangle. Thus, no padding will be applied.
A MapCameraUpdateFactory.lookAtPoints.viewRectangle is considered invalid, when its width or height are negative or zero, its origin
coordinates (x, y) are invalid, when they are negative.
All MapCameraUpdateFactory.lookAtPoints.viewRectangle values need to be finite to be considered as valid.
If measure limit is not valid, no update will be applied to the map camera.
The altitude of the target points is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.
-
pointsArray of points in geodetic space that should be visible inside the given view rectangle. -
viewRectangleView rectangle in viewport pixel coordinates inside which the geographical target area is displayed. -
orientationGeodetic orientation at the new calculated target point. -
measureLimitMap measure limit: -
as distance: the minimum distance from map camera to earth surface at the center of the view rectangle in meters. The map camera should not be positioned closer to the center of view rectangle than this.
-
as zoom level: the maximum zoom level for the new map camera state. Internally converted to minimum distance from map camera to earth surface at the center of view rectangle in meters. This is not the zoom level for the calculated lookAt target point. Can be used to not zoom closer than a given level.
-
as scale: the minimum scale for the new map camera state. Internally converted to minimum distance from map camera to earth surface at the center of view rectangle in meters. This is not the scale for the calculated lookAt target point.
Returns MapCameraUpdate. MapCameraUpdate instance.
Implementation
static MapCameraUpdate lookAtPoints(List<GeoCoordinates> points, Rectangle2D viewRectangle, GeoOrientationUpdate orientation, MapMeasure measureLimit) => $prototype.lookAtPoints(points, viewRectangle, orientation, measureLimit);