View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#1769
Originally Posted by CRCulver View Post
I upgraded today to V0.51.1 git:modrana-0.50.5-51-g606845d, newly pushed to the Maemo repos, but the problem with no downloaded tiles displaying without a network connection remains.
Turns out I've kinda totally broke tile loading from local storage in (at least :P) 0.51.1. When fixing this I've also found some other issues:
  • if layer type/extension changes, old stored map tiles became inaccessible
    • Example: extension was jpg before and is png now, modRana searches for png and ignores jpg
    • this probably happened for users of the MapQuest EU layer when it's extension was recently changed to improve compatibility with PoorMaps on Sailfish OS & to respect the actual file format of the tiles
  • no checking if the stuff modRana finds is actually an image
  • no attempt to find an alternative image file for the given tile coordinates if the first tried one turns out to either not exist or is not an image
So when I was at it I fixed all these issues listed above and made tile loading from local storage much more robust.

ModRana now checks all loaded tiles and logs if they are not images, tile loading is now extension independent. ModRana now even goes so far as to iterate over all other available tile files for the given tile coordinates if the primary coordinate is not found. This effectively means you can now have tile images named like this:

Code:
4/6/10.png
4/6/10.jpg
4/6/10.this_is_an_image
Where 10.png is not an image (html error page, 0 bytes, etc.) and 10.jpg is a png image and 10.this_is_an_image is a gif.

Lets say that the layer uses png by default, so modRana will try 10.png first, finds it is not an image so it tries other files with the 4/6/10 coordinates and returns the content of either 10.jpg or 10.this_is_an_image as both contain image data in a supported format.

modRana 0.51.2 has been released!
I've also released a new modRana containing all these fixes and improvements. Looking forward to your feedback!

Changelog
Code:
* Mon Jan 26 2015 Martin Kolman - 0.51.2
- fix tile loading from local storage
 - I've apparently managed to break it in the previous version :P
- make tile loading from local storage more robust
 - it is now file extension independent
  - modRana will fetch any suitable image for the given tile coordinates
  - this should prevent stored images from becoming inaccessible it layer extension changes
 - modRana now detects if the tile that has been loaded is not an image
  - all such cases are now logged
  - for files modRana tries to find another file with the same coordinates that is an image
- improved log messages for tile loading debugging
Originally Posted by CRCulver View Post
Furthermore, why are there still icons on the N900 for both Modrana and Modrana QML, if the QML version has been abandoned and clicking on that icon just opens the plain GTK version?
Well, it should still work - I've just kinda not checked if it does in ages. ;-)

Yeah, it would be good to do something about it. One option is to just remove it, which would also get rid of all the Qt dependencies modRana currently drags in. Another possibility would be to make it into a subpackage that is not installed by default. BTW, any idea is anyone is still using the QML/Qt 4 GUI ?
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 12 Users Say Thank You to MartinK For This Useful Post: