p-lr / MapView

A Fast, memory efficient Android library to display tiled maps, with support for markers, paths, and rotation.
Apache License 2.0
189 stars 38 forks source link

BitmapFactory: bitmap marked for reuse #32

Closed Golgorz closed 2 years ago

Golgorz commented 3 years ago

Hello! i got this error on logcat: W/BitmapFactory: bitmap marked for reuse (2097152 bytes) can't fit new bitmap (4194304 bytes) No tiles are shown. Tiles are 32bit png with alpha, Any suggestions? if i converte them to webp they do not work either. Those tiles does show in ImageView but not in this tile library :S

Thanks!

p-lr commented 3 years ago

Hello, this is most probably due to an incorrect configuration of the mapview, regarding tile size. What is the size of your tiles? MapView only support square tiles (for now). For example, if your tiles are 512x512 your configuration should look like:

val config = MapViewConfiguration(levelCount = 7, fullWidth = 25000, fullHeight = 12500,
                                  tileSize = 512, tileStreamProvider = tileStreamProvider)
                                  .setMaxScale(2f)

(pay attention to the tileSize parameter)

Golgorz commented 3 years ago

its 1024x1024 in jpg it works fine, but in png it does not show

p-lr commented 3 years ago

If you're still having this issue, could you please make a fork the project, edit the demo and reproduce your issue? That way, I can see what's going on.