new ImagesManager()
- Source:
- mapspace-street/imagesmanager.js
Extends
- Mapspace.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
Mapspace.street.Image The street image to add.
- Source:
- mapspace-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:
- mapspace-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
Mapspace.street.Image
object. If not returns null.Parameters:
Name Type Description imageId
string Image id of the image we want to get.
- Source:
- mapspace-street/imagesmanager.js
Returns:
- Type
- Mapspace.street.Image | null
-
getImageCenter(imageId)
-
Return the
Mapspace.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:
- mapspace-street/imagesmanager.js
Returns:
The image center. If no image is found undefined is returned.
- Type
- Mapspace.Coordinate | undefined
-
getImageHeight(imageId)
-
Return the {number} height of the image. This height is the point where the street image is shot. This value is in meters.
Parameters:
Name Type Description imageId
string The ID of the image to search the center for.
- Source:
- mapspace-street/imagesmanager.js
Returns:
The image height. If no image is found undefined is returned.
- Type
- number | undefined