Skip to content

Adding only one layer #90

Answered by p-lr
RamaKrishnaBodavula asked this question in Q&A
Discussion options

You must be logged in to vote

Although this library is almost usable for this usage, the fact that only square tiles are supported makes it not appropriate for now.
However, if your single image has equal width and height, setting the tile size to the image size, and scrolling to the center should work.
In the example below, the single image is a square of 1920px width.

val state: MapState by mutableStateOf(
    MapState(1, 1920, 1920, tileSize = 1920) {
        scale(1f)
        scroll(0.5, 0.5)
    }.apply {
        addLayer(tileStreamProvider)
    }
)

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@p-lr
Comment options

@RamaKrishnaBodavula
Comment options

@RamaKrishnaBodavula
Comment options

@Nohus
Comment options

Answer selected by RamaKrishnaBodavula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants