May 14, 2016 at 12:08 PM
Edited May 14, 2016 at 4:39 PM
I noticed some strange or wrong behaviour with the mapbox control using a brutile async layer. This is the main code, very simple:
Dim tileSource1 = BruTile.Predefined.KnownTileSources.Create(BruTile.Predefined.KnownTileSource.BingHybrid)
Dim Newlay As New SharpMap.Layers.TileAsyncLayer(tileSource1, "Bing Hybrid")
MapBox1.ActiveTool = SharpMap.Forms.MapBox.Tools.Pan
If you turn on MapBox1.ShowProgressBar, tiles seems to be drawn like in groups. Rendering seems to stops some time, and suddenly ten or more tiles are drawn at once, making the mapbox like laggy.
On the other side, with ShowProgressBar turned off, you can notice how tiles are drawn 1 by 1, very fast, with no lag for the user.
This behaviour it's noticeable also when you set SetToolsNoneWhileRedrawing to true, but less pronounced. Sometimes seems to work ok, sometimes mapbox seems laggy and drawing tiles "by groups".
ARTIFACTS OR STRANGE BEHAVIOUR WHEN PANNING
With pan as the mapbox active tool and using a brutile async layer, if you click and move mouse to pan while tiles are still being downloading (and painted) to complete the map background (base map), map seems to move from the actual panning positiong to previous
map center point each time a tile is painted.
I think this behaviour could be related to mapbox trying to paint tiles received after click to pan event. You can notice how a few tiles are drawn after click to pan, and then tile draw stops.
This is the result of panning a map while it's still downloading/drawing tiles, notice the missplaced tiles. Map redraws ok after stopping pan action.