Coder Social home page Coder Social logo

Blank tiles about mapview HOT 4 CLOSED

p-lr avatar p-lr commented on July 24, 2024
Blank tiles

from mapview.

Comments (4)

uyt95 avatar uyt95 commented on July 24, 2024 1

I wasn't able to reproduce it on other devices, but I found the cause.
Xiaomi devices have a bad forced dark mode implementation that sometimes overwrites tiles with a blank tile. To fix this, I added the following to my application style: <item name="android:forceDarkAllowed">false</item>

Thanks for your help!

from mapview.

p-lr avatar p-lr commented on July 24, 2024

Hi,

I tried to reproduce it locally, in a demo with a single level. No blank tiles.
Which version of MapView are you using?

from mapview.

uyt95 avatar uyt95 commented on July 24, 2024

Hi, at first I was using version 2.1.3. I upgraded to 2.1.4 and the issue remains.
I've created a demo that always reproduces the issue for me with a lot of blank tiles:
https://github.com/uyt95/BlankTilesDemo

from mapview.

p-lr avatar p-lr commented on July 24, 2024

I've tried your demo on my device and on two emulators, and I never saw a blank tile. Nice map BTW.
This is really surprising. Have you reproduced your issue on other devices?

Also, I have a remark about your TileStreamProvider:

TileStreamProvider { row, col, _ ->
   try {
      application.assets.open("tiles/${col}x${row}.jpg")
   } catch (e: Exception) {
      null
   }
}

If on your device, there's something wrong when reading a tile file from the assets, you silently catch the exception.
You should add e.printStackTrace() before returning null. You might see some exceptions in logcat. This might come from permission issues.

from mapview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.