This is a migrated thread and some comments may be shown as answers.
Display Error Message when map not available
1 Answer 13 Views
Map
This is a migrated thread and some comments may be shown as answers.
Perry
Top achievements
Rank 1
Perry asked on 30 May 2019, 03:41 PM
We seem to be getting a few network errors where tile.openstreetmap.org (a,b,c, subdomains) are sometimes unavailable.   What would be the best way to detect this and then display a message to the user that "Map is not Available"?

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 03 Jun 2019, 11:10 AM
Hi Perry,

Generally speaking, the map is a container full of img elements. each img element represents a tile. In other words, the images are requested by the browser - not by us and therefore we do not have access to that request and check whether it succeeded.

Nevertheless, you could add a service worker to your page and use it as a proxy to check whether there is a failing request.

Also, I can suggest you to take a look at the following thread where testing whether images are loaded correctly is discussed:


I hope this helps


Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Map
Asked by
Perry
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or