Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitmapFactory: bitmap marked for reuse #32

Closed
Golgorz opened this issue Sep 25, 2021 · 3 comments
Closed

BitmapFactory: bitmap marked for reuse #32

Golgorz opened this issue Sep 25, 2021 · 3 comments

Comments

@Golgorz
Copy link

Golgorz commented Sep 25, 2021

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
Copy link
Owner

p-lr commented Sep 25, 2021

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
Copy link
Author

Golgorz commented Sep 26, 2021

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

@p-lr
Copy link
Owner

p-lr commented Oct 1, 2021

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.

@p-lr p-lr closed this as completed Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants