lookToMatchGeoPointToViewPoint static method

MapCameraUpdate lookToMatchGeoPointToViewPoint(
  1. GeoCoordinates geoPoint,
  2. Point2D viewPoint
)

Creates an update to position the map camera to look at the map with the given geo point located at the given view point.

Note that this is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

The altitude of the target point is ignored. Any subsequent camera updates and animations will consider the target point as being located on the ground.

  • geoPoint The geo point that will be matched to the given view point. Note: the geo point will differ from the look at target of the camera. After this update the camera will still look at the principal point and therefore the look at target will be different from the geo point, since the geo point will correspond to the given view point and the look at target will correspond to the principal point. Look at target and the geo point will be identical only if the given view point is identical to the principal point.

  • viewPoint View point coordinates in pixels.

Returns MapCameraUpdate. MapCameraUpdate instance.

Implementation

static MapCameraUpdate lookToMatchGeoPointToViewPoint(GeoCoordinates geoPoint, Point2D viewPoint) => $prototype.lookToMatchGeoPointToViewPoint(geoPoint, viewPoint);