BruTile FileCache and panning

Oct 20, 2011 at 3:07 PM

Hi,

I'm using BruTile and MapsUI to develop an hybrid online/offline desktop map for our users. This is not a straightforward proposition and after several weeks of trying tons of different products and libraries, this project is just about as good as it gets.

I have noticed one problem, however, and I'm not sure where to go in the code to address it.

When the internet is connected the WMS Tile provider downloads the tiles and Caches them on disk. When disconnected, the FileCache I have specified is used. As I zoom in, the previously cached tiles load just fine. However, once I am zoomed in, and I start panning around, or imagine I have a GPS connected and I drive up the road a bit, these tiles do not get replaced with the cache that I know I have. (I pre-cached all levels 0-15 for a small area) They remain the tile of potentially 2 or 3 zoom levels out, depending on how far I've panned from where I zoomed. However, if I zoom out past a zoom level and back into it, they get replaced just fine. I need to fix this such that panning will also trigger grabbing the tiles I have cached when not connected.

When the internet is working, panning fetches tiles correctly. I assume its a fairly straightforward fix, just that no one has noticed it.

Thanks,

Cody

Coordinator
Dec 5, 2011 at 6:53 AM

hi Cody,

Not sure what is going on here. One guess: The manual pan/zoom triggers a data refresh, but the pan/zoom through code (on gps position change) does not. In the current version of Mapsui such a data refresh would be called with MapControl.OnViewChanged. So you would need to call MapControl.OnViewChanged when you center the map on the new gps position.

What client are you using? 

Paul