This object is in archive! 

Map overlay feature - performance

Alastair Breingan shared this question 4 years ago
Answered

Hi again, and thanks for a great product.

In ticket 20194 you suggested that I use the map overlay feature to switch between two offline maps, the first being your LoMap of NSW and a smaller area covered by a 1.2GB MBTiles map.

This works, but does cause very long delays when scrolling or especially zooming in and out of the smaller area, and at worst makes the app freeze for a minute or more. This is understandable, but i am looking for advice on how best to mitigate this.


I am happy to convert my MBTiles map or split it up or regenerate from the original geopdfs but have two questions

1. What map format would you suggest (I have MAPC2MAPC, and happy to find something that does the best job - I see that you support and seem to like gemf maps?)


2. Is it better to have one large or many smaller maps and do you have a feeling for the best size to support several GB of raster maps.

Thanks again for your support

Alastair

Replies (7)

photo
1

Dear Alastair,

could I ask you what happen if you display the mentioned map separately (with disabled map overlay)? Is the zoom/pan smooth?

BTW: MBTiles should be quick enough and it's basically the best option for your converted geopdf files.

Petr

photo
1

Petr,

Yes, scrolling and zooming when displaying only the MBTiles is fine, with just a quarter second sometimes of "loading" when scrolling quickly. It seems when in overlay it decides which to display on each movement and that is obviously slower and at the extreme maybe several attempts are in the queue and the impatient user keeps scrolling so it gets worse. Not sure if that is correct but that is what it feels like.

Just some more background on my use case. The MBTiles are at a single level 16, and covers my normal area. The LoMap is there as a backup when out of area, or when looking at a large area when the MBTiles is no longer useful. I dont need transparency and what would be ideal is a rule that says keep on the overlayed map until you leave the area or zoom to a level 3 or 4 less than in the map.

In my case the MBTiles map is useful from full scale to when your scale at the bottom of the screen is showing 1-2km. However at the moment the changeover to the LoMap is somewhere where the scale is between 10 and 20 km, by which time the MBTiles map is not readable.


Let me be clear: I understand you cannot be all things to all people; I have tried lots of software and Locus is by far the best for my needs, i have to prepare more maps and so before i do that i want to make sure i have the best compromise.


Thanks again for your help

photo
1

Dear Alastair,

I think that the issue may be caused due to a single level MBtiles map. I guess that problem appears when you zoom-out from level 16.

Please try to regenerate the .mbtiles map and add all zoom levels (eq. 7 - 16). You can skip for example level 15 to reduce the map file size

Please let me know about the progress.

Petr

photo
1

Thanks Petr,

i will give that a go, though it may be some time as i have to rebuild the MBTiles from about 50 pdfs and crop each one!

So i will close this question and reference it if needed.


Thanks again

Alastair

photo
1

Hi,

maybe that isn't needed to re-generate all maps but only fill the zoom-level. Are you familiar with the command-line, please? There is a powerful family of utilities called GDAL and one part should be able to fill missing zoom-levels. Please see https://gdal.org/programs/gdaladdo.html

gdaladdo -r nearest -oo "TILE_FORMAT=PNG8" -oo "ZLEVEL=9" "mapbase yourmap.mbtiles" 2 4 8 16 32 64
The command above should add levels 15 - 10. Honestly, I didn't try but if you want please test it and let me know about the progress

Thanks, Petr

photo
1

Thank you again, I have tried various things and now have a solution that works very well.


I have to admit that most of the problem was my stupidity! I must have fiddled with the blend mode and then ended up on 100% opaque but without the blend mode disabled, and that obviously slows things down considerably.


The combination of setting the zoom levels up to the point that the local topo is no longer readable, then works very well.

Thanks

Alastair

photo
1

Hi,

great, I'm glad that's 'fixed'.

Thank you

Petr

Replies have been locked on this page!