ThinkGeo.com    |     Documentation    |     Premium Support

Cloud tile cache not working if application launched without network

Hi,

I enabled simple tile cache for the cloud maps in the test application:

    private void mapView_Loaded(object sender, RoutedEventArgs e)
    {
        // Set the Map Unit.
        mapView.MapUnit = GeographyUnit.Meter;

        // Add a base map overlay.
        var cloudRasterBaseMapOverlay = new ThinkGeoCloudRasterMapsOverlay("USlbIyO5uIMja2y0qoM21RRM6NBXUad4hjK3NBD6pD0~", "f6OJsvCDDzmccnevX55nL7nXpPDXXKANe5cN6czVjCH0s8jhpCH-2A~~", ThinkGeoCloudRasterMapsMapType.Light);
        cloudRasterBaseMapOverlay .TileCache = new FileRasterTileCache(@"tile_cache", "test_id", RasterTileFormat.Png);
        mapView.Overlays.Add(cloudRasterBaseMapOverlay);

        mapView.Refresh();
    }

This is the experience from testing:

  1. When I launch the application with network enabled, the tile cache works as expected. More tiles are stored into tile cache directory, when zooming and panning around the map.

  2. If network is disconnected, the map can be still used, but no new tiles are fetched --> OK

  3. If application is restarted, only errors are shown on the map, but the tile cache on disk is not used —> NOK

  4. If network is connected again whilst app is running, the map starts working --> OK

  5. If network is disconnected whilst app is running, the tile cache still works --> OK

So the tile cache seems to work differently depending on whether the network was down at the time of application startup, or if it was disconnected later. I’d expect the tile cache to also work, if app is launched without network.

Can this be improved? (also with other overlays, like cloud vector overlay and WMS and WMTS overlays)

Thanks, Rasmus

Rasmus,

Thanks for reporting this issue, the reason is that we have to pull the “credentials” from the server at the very beginning, before tile request. No internet makes it run into “network” exception.

Now it has been fixed in the latest version " 13.0.0-beta273" or higher of “ThinkGeo.Core”, which is built every night. Please check the updates at https://www.nuget.org/packages/ThinkGeo.Core.

Thanks,
Johnny

Hi Johnny,

I updated to 13.0.0-beta273, but it didn’t seem to fix the problem. I still see this error, if I launch the application without network:

BR,
Rasmus

Hi Rasmus,

Sorry that I made a mistake during the test, could you try 13.0.0-beta274, which should works fine.

Thanks,
Johnny

Hi Johnny,

I can’t see beta274 in Nuget browser. The latest seems to be beta273. When is beta274 expected to be available?

Thanks, Rasmus

Hey @Rasmus_Rahunen,

ThinkGeo.Core 13.0.0-beta274 is now available for you to download and try out the changes we made to see if your issue is resolved.

Thanks,
Kyle

Hi Kyle,

I downloaded the new beta274 and it is now working fine. :slightly_smiling_face:

Thank you!
Rasmus

Hey @Rasmus_Rahunen,

Good to hear! Closing.

Thanks,
Kyle