Interface Overlay

Package world.mappable.mapkit.ui

interface Overlay

Allows to render overlay on the screen.

Summary

Methods

Type and modifiers

Method and Description

void

setImage(@NonNull ImageProvider image,
         @NonNull ScreenRect rect)

Sets image as content of overlay, resets view.

void

setView(@NonNull ViewProvider view,
        @NonNull ScreenRect rect)

Sets view as content of overlay, resets image.

void

remove()
Removes the overlay from the map.

boolean

isValid()
Tells if this Overlay is valid or not.

Methods

setImage

void setImage(@NonNull ImageProvider image,
              @NonNull ScreenRect rect)

Sets image as content of overlay, resets view.

Window origin (0, 0) - top left corner.


setView

void setView(@NonNull ViewProvider view,
             @NonNull ScreenRect rect)

Sets view as content of overlay, resets image.

Window origin (0, 0) - top left corner.


remove

void remove()

Removes the overlay from the map.


isValid

boolean isValid()

Tells if this Overlay is valid or not.

Any other method (except for this one) called on an invalid Overlay will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.


Next