Skip to content
Discussion options

You must be logged in to vote

Tried it in Android and it works fine. Assuming the permissions are granted

 // List of absolute paths (string, complete with extension) to .mbtiles files in your storage
val filesList = listOf(..., ..., ....)

 // Just for ID purposes
var count = 0

filesList.forEach(x -> 
   val rasterSource = RasterSource("$count-source", "mbtiles://$x", 256) // I use 256x256 tiles
   val layerSource = RasterLayer("$count-layer", "$count-source")
   style.addSource(rasterSource)
   style.addLayer(layerSource)
   count+=1;
)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ihazbackup
Comment options

@louwers
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by louwers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants