ThinkGeo.com    |     Documentation    |     Premium Support

Drawn exceptions stay on the map

Hi,

We noticed that if there’s no connection to online service and map is panned exception is drawn correctly as expected. When connection is restored and map is panned those exception are still seen. It will result this kind of view:

Also sometimes it looks like that layer is drawn top of exception when connection is restored and map is panned. (In this case exception was first drawn by OgcApiFeatureLayer and after connection was restored those black lines were drawn top of exception when panning).

Question is that is there something what could by done to re-draw those tiles with exception when connection is restored ? Also why in the second picture exception is still seen although layer is re-drawn after connection is restored ?

BTW, it seems if zoom level is changed those exception will be removed but you need to wait until new zoom level is fully drawn. But if you e.g quickly zoom in/out exceptions are still seen.

Br, Simo

hi Simo,

These error tiles are marked as drawn_completed, so they will not be updated when panning within the current map extent. To force a refresh, you need to pan the map to a completely different area and then pan back to the original location.

We could also make the error tiles look better by the following code, the error tiles will be blank.

arcgisLayer.DrawingExceptionMode = DrawingExceptionMode.ThrowException;
layerOverlay.ThrowingException += (s, e) =>
{
    e.Handled = true;
};

Regards,
Leo

Hi,

But would it be possible to not mark error tiles as drawn_completed so that those would be redrawn without need for panning to completely different area ?

Br, Simo

Hi @Simo_Karjalainen,

Yes, I’ve implemented this feature. Could you please upgrade to ThinkGeo.UI.Wpf 14.5.0-beta066(or newer) and give it a try?

Regards,
Leo

Hi,

Seems to be working with 14.5.0-beta066 and tile are loaded when map is panned (without need for panning to completely different area) after failure.

Is there someway to apply a workaround to make it work with 14.4.3 or is it possible to release a hotfix 14.4.4 with this fix ?

Br, Simo

OK, we’ve scheduled v14.4.4 hotfix by the end of this month. Let me know what more fixes you want us to include.

1 Like

Hi,

Tested this with 14.4.4 and like in beta tiles are now re-loaded when map is panned after connection failure.

But I noticed still one minor issue related to this. Problem is that tiles are not stored to cache when they are re-loaded after failure.

Steps to re-produce:

  1. Disconnect network
  2. Pan map to see failed tiles
  3. Connect network
  4. Pan map a bit and tiles failed on step 2 are now re-loaded correctly
  5. Disconnect network
  6. Pan map a bit and tiles failed on step 2 are again shown as failed even those were visible on step 4
    => Tiles are not stored to cache on step 4 from some reason

If on step 4 map is e.g zoomed in/out those problematic tiles are stored to cache. Probably this is somehow related to fact that caching is done on overlay level and maybe those failed tiles are re-loaded on layer level ?

Br, Simo

hi @Simo_Karjalainen ,

Thanks for reporting this issue. I’ve fixed it already. Could you try ThinkGeo.UI.Wpf 14.5.0-beta076 when it’s available?

Regards,
Leo

Hi,

Yes, now also cache is updated correctly with latest beta.

Is there some way to apply workaround on top of 14.4.4 to make this work also with that one ?

Br, Simo

Added it to our 14.4.5 list. We can have it released by late February.

1 Like

hi @Simo_Karjalainen,

Yes, you could apply a workaround on top of 14.4.4.

Here’s the workaround:

  1. Add 2 new classes: EnhancedLayerTileView and EnhancedLayerOverlay
  2. Replace LayerOverlay with EnhancedLayerOverlay in your code

EnhancedLayerTileView.cs

public class EnhancedLayerTileView: LayerTileView
{
    public EnhancedLayerTileView(): this(new Collection<Layer>()) {}
    public EnhancedLayerTileView(IEnumerable<LayerBase> layers): base(layers) { }

    public void ClearError()
    {
        this.Error = null;
    }
}

EnhancedLayerOverlay.cs

public class EnhancedLayerOverlay: LayerOverlay
{
    protected override TileView GetTileCore()
    {
        return new EnhancedLayerTileView(Layers);
    } 

    protected override void OnDrawnTile(DrawnTileTileOverlayEventArgs args)
    {
        if (args.DrawnTile is EnhancedLayerTileView enhancedLayersTileView && enhancedLayersTileView.Error !=null) 
        {
            enhancedLayersTileView.ClearError();
        }
        base.OnDrawnTile(args);
    }
}

Regards,
Leo

Hi,

Thanks for the workaround. Since 14.4.5 will be released so soon I think that we can wait for that and use 14.4.4 while waiting for 14.4.5. But anyway it’s good to know that workaround exist if this cache related bug causes some major issue on our side.

Br, Simo

Hi,

Great. Let me know if you have other questions. :slight_smile:

Regards,
Leo