Display Error Message when map not available

2 posts, 0 answers
  1. Perry
    Perry avatar
    26 posts
    Member since:
    Feb 2019

    Posted 30 May 2019 Link to this post

    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"?
  2. Georgi
    Georgi avatar
    698 posts

    Posted 03 Jun 2019 Link to this post

    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

    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.
Back to Top