This object is in archive! 

Locus Crashes with MBTILES overlay

Brandon K shared this problem 9 years ago
Solved

After the recent 3.8.0 update, I have several devices crashing everytime you tap on the map (mbtiles as an overlay). You can use the zoom buttons, and pan the map, but if you do a quick tap the app will crash. I wonder if this may have to do with the implementation of the clickable mbtiles for overlays idea? If I set a vector map as an overlay I do not have any issues.


Devices: Galaxy Tab S 8.4 - Android 4.4.2 & LG G2 - Android 5.02

Bugreport emailed to support.locus@asamm.com

Replies (8)

photo
1

I just found it together with fixing not working MBT overlays. Same issue.


Fixed, thanks!

photo
1

I have same issue. I noticed that when setting mbtiles as main map slows down Locus drastically. This never happened before.

photo
1

There are some errors on background that maybe cause this. Please wait to Sunday on a new version, where all should work as expected. Sorry for a troubles.

photo
1

Hi. I have updated yesterday. No crashing but my mbtiles overlay (70 mb) is very very laggy and slow. Browsing the map is almost impossible. I have created a transparent overlay with bike routes of pomorskie voivodship (aroud 100 km x 100 km wide) in Maperitive. Max zoom level for this map is 15.

photo
1

Hello Wojciech,


are you able to share with me some sample map that works slow for you? Btw are you sure you do not have on map for example 1000 tracks you forget to hide etc? Thanks

photo
1

Hi Menion,

No, I have disable all the tracks in the background. Vector map works very smooth. I only have problems with mbtiles map, it's really laggy...

Here is a link to this map (60 mb).


http://www34.zippyshare.com/v/Gjt7l7Nl/file.html


Maybe something is wrong with it?

photo
1

Ah, thanks! Hard work ... issue in not on your side, but again in my implementation of support for "grid data" system. In this case, your map do not have this "grid_data" table and result is repeating error on background that slow down a map a lot.


Temporary solution should be creating a empty table in your database, but if you do not hurry too much, I'll try to collect few more issues and small improvements and release another versions during next 14 days, possible? Sorry for this and thanks for bug-report!

photo
1

Hi Menion,


No worries. I can wait. What kind of file is that? I noticed that some json has generated when creating this map, maybe that's the one? If not how can I create one? :)

photo
1

Yes it is JSON, but it should be included inside of this MBT file. How to create - I have no idea, with this have to helps Brandon, who is expert on this ;).


Anyway more precisely it is called UTF Grid and it's specification is here https://github.com/mapbox/utfgrid-spec . This feature is anyway useful for cases, you have some metadata for certain places (pixels) on your map.

photo
1

I guess I can wait :) I know UTF Grid, I'm trying to implement it into my online version of map but still struggling with coding :)


Best regards!

photo
1

Hope Brandon should help here a little bit.


I'm at least checking your map. Seems it works better, but it is still slow. And well, seems you miss an index over "zoom_level, tile_column, tile_row" in "tiles" table, so try to create one over these three columns in this order, it should speed up loading a lot!

photo
1

How you edit it? I just generated it in maperitive and that's it. Maybe I should do something more?

photo
1

I'm not editing it. I just checked why maps load so slow. One issue (main) is error that happen in Locus (mentioned above). But even after this, map was a lot slower then background online map (MapQuest) I used. So I was checking what is wrong and found that in your sqlite database file (mbt map) is missing database index over "tiles" table, that speed up loading a lot for bigger maps as you have.

photo
1

I also can confirm this new issue. My maps without UTF grid are having issues after the last update. My maps with the feature enabled are working great!

I am not sure if I would call my self an "expert"....maybe a poweruser :) I have not had much time to look into this, but MButil (https://github.com/mapbox/mbutil) may be able to add the tables to an existing MBTILES map.

photo
1

Great work guys. How do you generate maps with utfgrid? Tilemill?

photo
1

The easiest way to add the feature would be with Tilemill. In Tilemill look in the lower left corner for the "Finger icon" and then the "Teaser" tab at the top is where you put the information. I thought about doing a how-to because it took a little while to figure it out. Locus Map + MBTILES map (UTF grid) makes for an amazing offline tool! Attached is a screenshot of one way I am using it (thanks to Menion for getting the UTF grid working for overlays). The parcel lines are an MBTILES overlay generated through Tilemill. I have the UTF grid delivering the parcel number and property owner.

**Sorry for getting off topic!

Replies have been locked on this page!