Hi,
I would have a question regarding the usage of external Tile Providers (Google Maps and so on): How can I ensure a generic exception handling, "provider-agnostic"? One uses the specialized classes such as GoogleMapsLayer, "BingLayer" and so on as base classes, sets the DrawExceptionMode to DrawException and overrides DrawExceptionCore in the subclass (as I have learned by reading some forum threads here).
This approach would work for a given provider, yet I cannot wrap my head around a generic solution, seeing that the base class for all the specialized layers is, of course, Layer. This class doesn't expose the precious DrawExceptionCore method, moreover one must implement DrawCore whose base method is, of course, abstract.
I have also tried to embed the exception handling within the parent LayerOverlay, to no avail. Drawing the exception only renders the "infamous" :) pink background with the cross in the center. What is more, all the threads return with the exit code "0" which should indicate a smooth/problemless run, which really shouldn't be the case when the tile provider's server couldn't be reached. Moreover, If I choose to let the exception be thrown I cannot find the spot in which I am supposed to catch it.
Is there a generic solution available?
My specific use case would be the handling of connectivity exceptions (e.g. no Internet connection, therefore one cannot use external Tile Providers). As mentioned, this would run great if I were to limit myself to a single class such as GoogleMapsLayer, override the DrawExceptionCore and handle the exception there. Would be very interested to see if another solution is available, seeing that a switch to OSM is in the books. Repeating the generic exception handling in each subclass is of course pointless.
Thank you in advance for your support! I am able to provide any other details per request.
P.S. : I'm using ThinkGeo WPF Edition 4.5 running .NET (C#).