Hi,
I have severall questions about the integration of google, bing, openstreetmap, mapbox in a wpf application.
- In our appplication, I used a BingMapslayer. When I enter the applicationId, I visualize the BaseMap bing.
If I make a mistake typing in ApplicationId, to see what is the visual … I have an error not caught ;-(
I have however specified the following code:
var layer = new BingMapsLayer(string.Empty, BingMapsMapType.Aerial)
{
DrawingExceptionMode = DrawingExceptionMode.DrawException
};
layer.DrawingException += Layer_DrawingException;
layer.DrawnException += Layer_DrawnException;
The error is this (this error is logic because i don’t have the applicationId
but I would want intercept the error ((as you do in your example BackgroundMapSwitchingSample-ForWpf-master example))
2018-11-07 11:13:08.8809 12:System.Net.WebException:Le serveur distant a retourné une erreur : (401) Non autorisé.
à ThinkGeo.MapSuite.Wpf.Tile.DrawException(GeoCanvas geoCanvas, Exception exception)
à ThinkGeo.MapSuite.Wpf.Tile.Draw(GeoCanvas geoCanvas)
à ThinkGeo.MapSuite.Wpf.Tile.hFY=(Object status)
à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
à System.Threading.ThreadPoolWorkQueue.Dispatch()
- Our application is in Lambert93 projection and the thinkgeo version used 10.2.5
I looked at your BackgroundMapSwitchingSample-ForWpf-master example.
This is an improvement that we want to make in order to offer the user to be able to switch from a basemap bing, google, mapbox, classic raster. (tif, ecw etc …)
In your example, you use BingMapsTileOverlay and not BingMapsOverlay … what’s the difference?
Currently, I’m using BingMapLayer, what’s the difference between BingMapLayer, BingMapsOverlay and BingMapsTileOverlay?
When I look at the description of BingMapsOverlay, there is the notion of ProjectedTileCache and ProjectionFromSphericalMercator …
Is it possible to reproject on the fly the tiles obtained from bing? ie reproject the EPSG tiles: 3857 to EPSG: 2154?
Or is it better to keep the basemap bing in 3857 and reproject the vector layers that are in lambert93 to EPSG: 3857?
For google, currently there is GoogleMapsLayer and GoogleMapsOverlay … what is the difference in terms of performance, etc …?
In your example, you instantiate the layers you want to use and you play on the visibility of the layers to switch.
What is the best approach in terms of performance, instantiate all layers and change the visibility of layers or instantiate the layer only when the user chooses the layer he wants to see?
Thanks a lot for your help.
Regards
Steph.