Class StreetsideData

    • Constructor Detail

      • StreetsideData

        protected StreetsideData()
        Creates a new object and adds the initial set of listeners.
    • Method Detail

      • add

        public void add​(StreetsideAbstractImage image)
        Adds an StreetsideImage to the object, and then repaints mapView.
        Parameters:
        image - The image to be added.
      • add

        public void add​(StreetsideAbstractImage image,
                        boolean update)
        Adds a StreetsideImage to the object, but doesn't repaint mapView. This is needed for concurrency.
        Parameters:
        image - The image to be added.
        update - Whether the map must be updated or not (updates are currently unsupported by Streetside).
      • addAll

        public void addAll​(java.util.Collection<? extends StreetsideAbstractImage> images)
        Adds a set of StreetsideImages to the object, and then repaints mapView.
        Parameters:
        images - The set of images to be added.
      • addAll

        public void addAll​(java.util.Collection<? extends StreetsideAbstractImage> newImages,
                           boolean update)
        Adds a set of {link StreetsideAbstractImage} objects to this object.
        Parameters:
        newImages - The set of images to be added.
        update - Whether the map must be updated or not.
      • addMultiSelectedImage

        public void addMultiSelectedImage​(java.util.Collection<StreetsideAbstractImage> images)
        Adds a set of StreetsideAbstractImage objects to the list of selected images.
        Parameters:
        images - A Collection object containing the set of images to be added.
      • getSequences

        public java.util.Set<StreetsideSequencegetSequences()
        Returns a Set of all sequences, that the images are part of.
        Returns:
        all sequences that are contained in the Streetside data
      • selectNext

        public void selectNext()
        If the selected StreetsideImage is part of a StreetsideSequence then the following visible StreetsideImage is selected. In case there is none, does nothing.
        Throws:
        java.lang.IllegalStateException - if the selected image is null or the selected image doesn't belong to a sequence.
      • selectNext

        public void selectNext​(boolean moveToPicture)
        If the selected StreetsideImage is part of a StreetsideSequence then the following visible StreetsideImage is selected. In case there is none, does nothing.
        Parameters:
        moveToPicture - True if the view must me moved to the next picture.
        Throws:
        java.lang.IllegalStateException - if the selected image is null or the selected image doesn't belong to a sequence.
      • selectPrevious

        public void selectPrevious()
        If the selected StreetsideImage is part of a StreetsideSequence then the previous visible StreetsideImage is selected. In case there is none, does nothing.
        Throws:
        java.lang.IllegalStateException - if the selected image is null or the selected image doesn't belong to a sequence.
      • selectPrevious

        public void selectPrevious​(boolean moveToPicture)
        If the selected StreetsideImage is part of a StreetsideSequence then the previous visible StreetsideImage is selected. In case there is none, does nothing. * @throws IllegalStateException if the selected image is null or the selected image doesn't belong to a sequence.
        Parameters:
        moveToPicture - True if the view must me moved to the previous picture.
        Throws:
        java.lang.IllegalStateException - if the selected image is null or the selected image doesn't belong to a sequence.
      • setSelectedImage

        public void setSelectedImage​(StreetsideAbstractImage image)
        Selects a new image.If the user does ctrl + click, this isn't triggered.
        Parameters:
        image - The StreetsideImage which is going to be selected
      • setSelectedImage

        public void setSelectedImage​(StreetsideAbstractImage image,
                                     boolean zoom)
        Selects a new image.If the user does ctrl+click, this isn't triggered. You can choose whether to center the view on the new image or not.
        Parameters:
        image - The StreetsideImage which is going to be selected.
        zoom - True if the view must be centered on the image; false otherwise.
      • downloadSurroundingImages

        private static void downloadSurroundingImages​(StreetsideImage streetsideImage)
        Downloads surrounding images of this mapillary image in background threads
        Parameters:
        streetsideImage - the image for which the surrounding images should be downloaded
      • downloadSurroundingCubemaps

        public static void downloadSurroundingCubemaps​(StreetsideImage streetsideImage)
        Downloads surrounding images of this mapillary image in background threads
        Parameters:
        streetsideImage - the image for which the surrounding images should be downloaded
      • getMultiSelectedImages

        public java.util.Set<StreetsideAbstractImagegetMultiSelectedImages()
        Returns a List containing all StreetsideAbstractImage objects selected with ctrl + click.
        Returns:
        A List object containing all the images selected.
      • setImages

        public void setImages​(java.util.Collection<StreetsideAbstractImage> newImages)
        Sets a new Collection object as the used set of images. Any images that are already present, are removed.
        Parameters:
        newImages - the new image list (previously set images are completely replaced)