lookAtAreaWithGeoOrientationAndViewRectangle static method
- GeoBox target,
- GeoOrientationUpdate orientation,
- Rectangle2D viewRectangle
Create an update to look at the given geo-box and fit it inside the given rectangle.
If geoBox is not valid, no update will be applied to the map camera.
If the MapCameraUpdateFactory.lookAtAreaWithGeoOrientationAndViewRectangle.viewRectangle parameter is invalid, fully or partially outside the map view,
then the entire map viewport will be used as MapCameraUpdateFactory.lookAtAreaWithGeoOrientationAndViewRectangle.viewRectangle. Thus, no padding will be applied.
A MapCameraUpdateFactory.lookAtAreaWithGeoOrientationAndViewRectangle.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.lookAtAreaWithGeoOrientationAndViewRectangle.viewRectangle values need to be finite to be considered as valid.
In cases where it is not possible to find a solution for the given parameters, the resulting MapCameraUpdate will not change 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.
-
targetGeodetic box that should be visible inside the given view rectangle. -
orientationGeodetic orientation at the target point. -
viewRectangleView rectangle in viewport pixel coordinates inside which the geographical target area is displayed.
Returns MapCameraUpdate. MapCameraUpdate instance.
Implementation
static MapCameraUpdate lookAtAreaWithGeoOrientationAndViewRectangle(GeoBox target, GeoOrientationUpdate orientation, Rectangle2D viewRectangle) => $prototype.lookAtAreaWithGeoOrientationAndViewRectangle(target, orientation, viewRectangle);