Function calculateZoomLevelFromDistance

  • Calculates the zoom level, which corresponds to the current distance from camera to lookAt point. Therefore the zoom level is a float and not an int. The height of the camera can be in between zoom levels. By setting the zoom level, you change the height position of the camera in away that the field of view of the camera should be able to cover one tile for the given zoom level.

    As an example for this, when you have a tile of zoom level 14 in front of the camera and you set the zoom level of the camera to 14, then you are able to see the whole tile in front of you.

    Parameters

    • options: {
          focalLength: number;
          maxZoomLevel: number;
          minZoomLevel: number;
      }

      Subset of necessary MapView properties.

      • focalLength: number
      • maxZoomLevel: number
      • minZoomLevel: number
    • distance: number

      The distance in meters, which are scene units in MapView.

    Returns number

Generated using TypeDoc