Class: ImagesManager

bu.street. ImagesManager

This class is required to store street images.


new ImagesManager()

Source:
bu-street/imagesmanager.js

Extends

  • bu.Object

Methods


addImage(image)

Adds an image to the ImagesManager collection. If an image with same ID exists then it is replaced by the new one.

Parameters:
Name Type Description
image bu.street.Image

The street image to add.

Source:
bu-street/imagesmanager.js

findImageById(imageId)

Search images in local array and returns the index of the image if is present.

Parameters:
Name Type Description
imageId string

The imageId of the image to search for.

Source:
bu-street/imagesmanager.js
Returns:

Returns the index of the image in the images array or -1 if image is not stored in the images manager.

Type
number

getImageById(imageId)

If present, returns bu.street.Image object. If not returns null.

Parameters:
Name Type Description
imageId string

Image id of the image we want to get.

Source:
bu-street/imagesmanager.js
Returns:
Type
bu.street.Image | null

getImageCenter(imageId)

Return the bu.Coordinate center of an image. This center is the point where the street image is shot. Coordinates are always in WGS84 latlon, first value in the coordinate is longitude and second latitude.

Parameters:
Name Type Description
imageId string

The ID of the image to search the center for.

Source:
bu-street/imagesmanager.js
Returns:

The image center. If no image is found undefined is returned.

Type
bu.Coordinate | undefined