MapKit Mobile SDK

Package world.mappable.mapkit.map

Interface SublayerManager

interface SublayerManager

Provides interface to change drawing order of the map layers.

Summary

Methods

Type and modifiers

Method and Description

java.lang.Integer

findFirstOf(@NonNull java.lang.String layerId)
Finds the first sublayer which belongs to the layer with the specified ID and returns its index.

java.lang.Integer

findFirstOf(@NonNull java.lang.String layerId,
            @NonNull SublayerFeatureType featureType)

Finds the first sublayer which belongs to the layer with the specified ID and contains features of the required type, and returns its index.

int

size()
Returns size of the list of sublayers.

Sublayer

get(int sublayerIndex)
Returns the sublayer with the specified index.

void

remove(int sublayerIndex)
Removes the sublayer with the specified index.

void

moveToEnd(int from)
Moves the sublayer with the specified index to the end of the list.

void

moveAfter(int from,
          int to)

Moves the sublayer to the position after sublayer with the specified index.

void

moveBefore(int from,
           int to)

Moves the sublayer to the position before sublayer with the specified index.

Sublayer

appendSublayer(@NonNull java.lang.String layerId,
               @NonNull SublayerFeatureType featureType)

Creates the new sublayer and appends it to the list.

Sublayer

insertSublayerBefore(int to,
                     @NonNull java.lang.String layerId,
                     @NonNull SublayerFeatureType featureType)

Creates the new sublayer and inserts it after sublayer with the specified index.

Sublayer

insertSublayerAfter(int to,
                    @NonNull java.lang.String layerId,
                    @NonNull SublayerFeatureType featureType)

Creates the new sublayer and inserts it before sublayer with the specified index.

boolean

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

Methods

findFirstOf

@Nullable
java.lang.Integer findFirstOf(@NonNull java.lang.String layerId)

Finds the first sublayer which belongs to the layer with the specified ID and returns its index. Returns none, if no such sublayer exists.


findFirstOf

@Nullable
java.lang.Integer findFirstOf(@NonNull java.lang.String layerId,
                              @NonNull SublayerFeatureType featureType)

Finds the first sublayer which belongs to the layer with the specified ID and contains features of the required type, and returns its index. Returns none, if no such sublayer exists.


size

int size()

Returns size of the list of sublayers.


get

@Nullable
Sublayer get(int sublayerIndex)

Returns the sublayer with the specified index. Returns none, if no such sublayer exists.


remove

void remove(int sublayerIndex)

Removes the sublayer with the specified index.


moveToEnd

void moveToEnd(int from)

Moves the sublayer with the specified index to the end of the list.


moveAfter

void moveAfter(int from,
               int to)

Moves the sublayer to the position after sublayer with the specified index.


moveBefore

void moveBefore(int from,
                int to)

Moves the sublayer to the position before sublayer with the specified index.


appendSublayer

@NonNull
Sublayer appendSublayer(@NonNull java.lang.String layerId,
                        @NonNull SublayerFeatureType featureType)

Creates the new sublayer and appends it to the list.


insertSublayerBefore

@NonNull
Sublayer insertSublayerBefore(int to,
                              @NonNull java.lang.String layerId,
                              @NonNull SublayerFeatureType featureType)

Creates the new sublayer and inserts it after sublayer with the specified index.


insertSublayerAfter

@NonNull
Sublayer insertSublayerAfter(int to,
                             @NonNull java.lang.String layerId,
                             @NonNull SublayerFeatureType featureType)

Creates the new sublayer and inserts it before sublayer with the specified index.


isValid

boolean isValid()

Tells if this SublayerManager is valid or not. Any other method (except for this one) called on an invalid SublayerManager 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.