ThinkGeo.com    |     Documentation    |     Premium Support

Exceptions on TileType PreloadDataMultiTile

Hi Team, we set up an Overlay with TileType.PreloadDataMultiTile, tileBuffer: 2, and a TileCache.

Panning now throws following exception:

System.ArgumentNullException: ‘The parameter you supplied may not be null. (Parameter ‘extent’)’
ThinkGeo.Core.dll!ThinkGeo.Core.ValidatorHelper.CheckObjectIsNotNull(object parameterObject, string parameterName) Line 609 C#

ThinkGeo.Core.dll!ThinkGeo.Core.ZoomLevelSet.GetZoomLevelForDrawing(ThinkGeo.Core.RectangleShape extent, double screenWidth, ThinkGeo.Core.GeographyUnit mapUnit) Line 383 C#
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.LayerOverlay.4kk=(ThinkGeo.Core.RectangleShape targetExtent) Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.LayerOverlay.PrefillDataToTilesCore(System.Collections.Generic.IEnumerable<ThinkGeo.UI.Wpf.TileView> tiles) Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.TileOverlay.PrefillDataToTiles(System.Collections.Generic.IEnumerable<ThinkGeo.UI.Wpf.TileView> tiles) Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.TileOverlay.VEs=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.TileOverlay.T0s=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.TileOverlay.Tks=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.LayerOverlay.mUs=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.Overlay.Oks=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.vko=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.wUo=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.vUo=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.u0o=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.5Eo=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.zUo=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.8Eo=.MoveNext() Unknown
ThinkGeo.UI.Wpf.dll!ThinkGeo.UI.Wpf.MapViewBase.0Ec=(object sender, System.Windows.Input.MouseButtonEventArgs e) Unknown
ThinkGeo.UI.Wpf.dll!AEc=.MUg=.dkg=(object sender, System.Windows.Input.MouseButtonEventArgs e) Unknown

The map renders fine afterwards.
Let me know if I can give you any more information.

Thanks
J

Can you pull the latest beta122 and have another try? Send me the code snippet if you still see this issue.

Thanks,
Ben

Hi Ben, the exceptions are no longer thrown, however the performance is way worse than using MultiTile, especially when zooming - can you reproduce this? It seems to freeze when scrolling more than one zoom level. We have 2 shapefile layers in that overlay, thats it

Hi Julian,

The preload path was doing too much synchronous work during pan/zoom, especially when moving across multiple zoom levels, which is why it could feel like it was freezing. We’ve made changes and can you pull the latest beta124 and have another try?

Thanks
Ben

Thanks, will do - just curious, is there ever a reason to use MultiTile anymore? I don’t see the benefit if performance is fixed, or does the PreloadDataMultiTile have downsides I havent read about yet?

Edit: I just tested it, and that fixed the lag when scrolling multiple zoom levels.
The performance side by side still seems to be slower than MultiTile in my usecase when zooming in and out?

Yes, there are still cases where MultiTile makes sense. And it’s not a surprise you feel MultiTile is faster.

  1. PreloadDataMultiTile can be less efficient than MultiTile when TileCache is enabled. It only preloads data for the tiles that still need to be drawn, but it does that by querying one combined bounding box. If the missing tiles are adjacent, that is usually efficient. If they are far apart, it can fetch a much larger area than MultiTile would fetch tile-by-tile.

  2. For thread-safe layers (for example, when layer.ThreadSafe == ThreadSafetyLevel.Safe), MultiTile can be faster because each tile can fetch data concurrently.

  3. MultiTile can also feel more responsive, because each tile handles its own data fetching and rendering independently. That means the first visible tile may appear sooner than in PreloadDataMultiTile, which does an upfront preload step first.

  4. PreloadDataMultiTile is especially useful when data fetching is the expensive part, for example when the data comes from a remote database or another slow source, and neighboring tiles would otherwise repeat a lot of the same work.

Thanks,
Ben