Forum: General Topics
Forums / General Topics / Preloading vector maps ?
Subject: | Preloading vector maps ? | |
shchenka 9:40 | Hi, Is there a way to pre-load vector maps, so that they can be used later offline, e.g. when travelling abroad or to an area with no gsm coverage ? (as opposed to caching ?) Also, is there a way to force reloading a particular tile (when online, obviously) ? It seems that vector maps display for some scales only, anyway ? | |
Stephen 14:01 Location: Phone Model: | Hi Shchenka, Caching is the only way to preload the vector maps - make sure you've set your phone to use the memory card cache then just scroll around the area to download the tiles. Once downloaded they'll then be available fully offline in the future. To reload a tile use the Vector Map Options/Reload Current Map function. This reloads the current set of 4,6 or 9 tiles from the TMJ server. If the server tiles are more than about 10 days old this should also trigger the tile generator to regenerate the tiles from the latest OSM data (updated daily). However note that the tiles are rendered in a queue so it can take anything from a few seconds to several minutes (sometimes even hours) to rerender, depending on current load. See this thread and this thread for a bit more info. Cheers, Stephen ps: Yes, the vector maps only show up at zoom levels 7-10. I've not yet found a reliable method to reduce the OSM vector data complexity sufficiently for lower zoom levels, without it looking rubbish! | |
shchenka 15:01 | Thanks, Stephen, and sorry for starting a new thread for what already has been discussed. I've noticed that some tiles shomehow just don't want to load, not sure why, hence I thought if there is a way to force a particular tile reload. Not sure if this is a server-side problem generating the tiles, or just my phone not loading them. E.g. sometimes the current tile would not show up, but the neighbours do (maybe from the cache ?). I've seen it a couple of times but could not pinpoint any specific circumstances. Does this sound any familiar to you at all ? | |
Stephen 21:53 Location: Phone Model: | There are a few little issues with the tile loading/caching which might be what you're seeing, which I've not fully been able to track down. I do suspect some issues on the webserver, though check if there are any related errors in the the Event Log, which could indicate a corrupted tile, either on the webserver or in its transmission over the mobile network to the phone. The webserver does sometimes get confused when an old tile is requested - it *should* trigger the tile generator to rerender the tile but in the meantime serve the existing old tile to the phone. I've made a few alterations to this code tonight which may help (there was at least one obvious bug), I'll keep an eye on it myself over the next few days, will hopefully get to the bottom of it! Cheers, Stephen | |
shchenka 13:59 | And what are these eight little coloured squares in the right of the plan/vector map screen ? They seem to be some sort of progress indicator ? How should I read them, is that documented somewhere ? | |
Stephen 16:23 Location: Phone Model: | Yes, the colours are: Red: the tile is not available for some reason, or not requested (eg if Enable Web hasn't been set and it is not available in the cache) Lime Green: the tile is currently being downloaded Medium/Dark Green: the tile has been downloaded and is being prepared for display Blue: the tile is not currently available on the Tile Server, but has been scheduled for creation - this should generally only take a minute or so, but may be longer if the server is under heavy load. The tile will be repeatedly re-requested every minute (if it is still needed on screen). (The changes I made to the server on Sunday were intended to reduce the number of 'Red' tiles, which seems to have improved things a little here...) Cheers, Stephen | |
shchenka 16:54 | I see. So, all cached tiles should display dark green, right ? | |
MrTom 19:01 | If you haven't searched this, the "User Guide" in the "Vector" section has a good explanation of this. Some times you have to be patient and wait for the information to be obtained for the download. I have downloaded as much of the TMJ information files as I could find and converted it to a PDF file for easy off-line searching. TMJ is a feature rich application and even though the menu system is extremely good I forget how to access infrequently used features. Not unusual to discover something I have completely forgotten about of just overlooked... . | |
Stephen 19:02 Location: Phone Model: | Yes, although if all tiles have loaded correctly (ie the ideal situation) then the status markers will disappear completely. Ah, also I forgot the Orange marker, this shows a tile is currently being read/decoded from the cache. | |
shchenka 18:38 | Thanks. I always tend to miss looking at the right place of the documentation. This time I searched the tutorials and the faqs but somehow missed the user guide. Thanks for your patience with me, Stephen :) | |
ChrisM 10:05 Location: Phone Model: | Just a thought, Stephen, Have you ever considered adding a service to the website whereby the user could enter a coordinate range (or select an area some other way) and the server could generate the necessary tiles, and provide a set of files that could be copied to the phone to cover the required map. If you made a reasonable charge per tile, then hopefully this would discourage excessive use of the system to help reduce pressure on the server, but still allow anyone that genuinely wanted a suitable map of a given area. I haven't really thought this through, but it seems as if it would be really useful to be able to get the vector maps for a specific area without having to spend ages clicking round the area on the phone. I'd certainly be prepared to pay a few quid to save me half an hour of clicking buttons! Not sure how this sits with terms and conditions of OSM, as I'd imagine your not allowed to charge for their maps, but I guess there is an argument that you are charging for the service, rather than the actual map data(??) Anyway, thought I'd just 'throw this one in there' ...! :o) Cheers, Chris. | |
shchenka 21:26 | Still regarding the tile status indicators colours, what is the meaning of black and grey ? (and no tiles displayed) | |
Stephen 11:23 Location: Phone Model: | Shchenka, Black (or at least dark grey) markers might show up if loading from the web has failed due to an interrupted connection, eg the mobile signal breaks up half-way through download, etc. I hadn't mentioned this since I've not noticed getting this myself recently - are you getting these a lot? (It'll probably also show in the Text/GENERAL/SntRcdFld field as Failed transmissions). Mid-grey markers dont really mean much - they should only display very briefly (if at all) when a tile is first requested (but before the cache or web is checked)... Chris, This is an interesting idea, though I think it'd be better (and more user friendly) to keep the tile downloading on the phone rather than have the fiddle of transferring tiles from a PC. Also, I can't really see tile charging being popular - after all people have already subscribed to the vector maps so an extra payment for 'bulk' tiles would seem rather cynical!! (Incidentally, the OSM licensing isn't an issue here; the basic principle of OSM is that anyone is free to 'sell' the data - its up to the buyer as to whether they want to pay for it or else spend their time converting the raw data themselves). One thing I have thought of adding is a 'Play Route' function on the phone to aid in tile downloading, similar to the Visualisation Page/Play Track function. This simply scrolls the map to follow the track, and *should* (notwithstanding a bug or two) pause to download any tiles along the way. I figure if it could also automatically scroll along a Route, then it should be fairly straightforward to download a route and then cache all tiles along its length in a couple of clicks... Cheers, Stephen | |
shchenka 13:12 | Thank you Stephen. Yes, I'm seeing it a lot but only after I try to dowload to many tiles, so this may be connection related. I'll check if this happens too when I'm on WIFI. Regarding bulk tiles preloading, I for one would be happy to pay for this as an option, too, but I'm afraid Stephen might be right that besides a couple of users there might not be enough demand to justify the hassle of starting it as a charge service I would use it mostly when travelling abroad, where I do not wish to use data connection. Preloading along a route seems interesting, too but then again whould not this stress the server too much with power users (like me ;) defining all the most complex and long routes and then expecting the server to handle this ? Would some offline processing be an option, maybe ? That is splitting the operation into two phases, the first would involve ordering tiles, the server would generate them off its peak hours, and then the subsequent phase would bulk download them to the phone when they are available ? | |
Stephen 10:21 Location: Phone Model: | I've been looking into the 'load tiles along a route' option and have had it working in a test version. Yes, as you say, it will still increase the demand on the server, although its a lot more efficient to just request the tiles nearest to the route line than to grab a complete rectangular block, of which most tiles will probably never be viewed (especially true at zooms 9 and 10). Also, if you happened to have Web Enabled whilst travelling the route then the tileserver would still end up rendering the tiles anyway. (It tries to render the tiles around every phones 'live' location irrespective of whether they are requested by the phone at that time or not, so that if they are subsequently requested then they should already be up-to-date). For the route downloading I've also set the requests to use a different tile URL so that the webserver can (theoretically- I've not implemented this fully yet) de-prioritise them if under heavy load... Cheers, Stephen | |
shchenka 8:56 | I've noticed that sometimes maps do not load at all, and this happens regardless if they are stored in the cache or not. The tile loading "indicator square" remain red, while the connection is up, vector maps and web enabled etc. Any idea what I may be missing ? Or maybe these could be some server-side problems ? | |
Stephen 18:43 Location: Phone Model: | Hi Shchenka, Not too sure about this, I'm not aware of any particular problems on the tile server, apart from the odd slow-down when under heavier load... Do you get the problem only in particular areas (very densely mapped places perhaps), or can it occur anywhere. I wonder whether there might be a particular zoom7 tile that is overloading the tileserver and then not rendering the tile (and zoom 8,9 & 10 sub-tiles) correctly - if you'd like to give me the tile zoom, row and column (either here or off-list) I'll check that it is correctly rendered and cached on the server... Cheers, Stephen | |
shchenka 21:53 | Thanks. It seems to work fine now on the same tiles. Not sure why. I'll report back when this happens again, but these are not any particuler files. | |
(You must be logged in to post a reply to this thread)