zoomToward method

Camera zoomToward({
  1. required ArcGISPoint targetPoint,
  2. required double factor,
})

Creates a copy of the camera with its location moved in the direction of a target point by the specified zoom factor.

Parameters:

  • targetPoint — The 3D point the returned camera zooms towards. The returned camera is in the same spatial reference as the source camera. If the spatial reference of the point is not specified, it is assumed to be the spatial reference of the camera.
  • factor — The zoom factor the camera will be moved by based on the distance between the current camera location and the target point. For example, a factor of 2 will divide the distance in half for the new camera. Negative values will have no effect.

Return Value: A copy of the camera with the position moved.