Provider OSM doesn't work anymore

7 posts, 1 answers
  1. Thomas
    Thomas avatar
    11 posts
    Member since:
    Jul 2017

    Posted 06 Jan Link to this post

    Hello,

    I work with Telerik WPF 2016.R3 and since this morning the provider OpenStreetMap doen't work anymore

     

    I check with the site of OpenStreetMap and the request done by the provider with my navigator and it works well but when my application is calling OSM to get tiles it returns an HTTP error 429 : too many requests

     

    This problem only happens since this morning, last week it works perfectly.

     

    All our applications use this provider to show the map, and so all our clients have the problem !

     

    From my first investigations:

    - the Telerik provider use HTTP protocol but when using in my navigator it redirects automatically in HTTPS (I don't know if it has an impact)

    - I tried to create a new provider using Telerik Map Source of OSM to force the HTTPS but the same HTTP Error 429 happens

    - Using Fiddler to check the request I succeed to have a good response when I added a User-Agent Header in the request

    - using the latest demo (WPF 2019.R3), in the sample of Provider Bing and OSM, Bing works correctly but not OSM (the same HTTP error 429 happens)

     

    Do you have any idea of what's happening and how to fix it please ?

     

    Thank you

    Thomas

     

    PS : I can't update my version of Telerik because there is a very big impact on the map layer management done in v2017.R3 that cannot match our layer management in our application.

  2. Norip
    Norip avatar
    2 posts
    Member since:
    May 2017

    Posted 06 Jan in reply to Thomas Link to this post

    I also discovered that the OSM PROVIDER tile does not appear normally yesterday.
    There is no clue to know what happened, after all, some displays need to be continued.
    Thank you.
  3. Norip
    Norip avatar
    2 posts
    Member since:
    May 2017

    Posted 06 Jan in reply to Norip Link to this post

    Forgot to note, I used the version number 2019.3.1022.40.
  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3142 posts

    Posted 07 Jan Link to this post

    Hi Thomas and Norip,

    It seems the tile usage policy of the OpenStreetMaps has changed recently to require UserAgent header in the web request for downloading map tiles.

    Our RadMap's OpenStreetMap provider does not set such default header, and it actually should be set per application / browser / device (not sure yet but certainly shouldn't be part of our code).

    We have logged a bug report stating that our provider does not follow the new policy but generally the idea that we will discuss and probably implement soon is to provide easier API for setting such web headers.

    Map: OpenStreetMap provider does not follow the latest OpenStreetMap tile usage policy requiring UserAgent header.

    Currently the workaround is to inherit the OpenStreetMap provider like so:
     public class CustomOpenStreetProvider : OpenStreetMapProvider
        {
            public CustomOpenStreetProvider()
            {
                OpenStreetMapnikSource osmMapInkSource = this.MapSources.Values.ToList()[0] as OpenStreetMapnikSource;
                if (osmMapInkSource != null)
                {
                    osmMapInkSource.WebHeaders.Add(System.Net.HttpRequestHeader.UserAgent, "your custom user agent string");
                }
            }
        }

     

    Regards,
    Petar Mladenov
    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.
  5. Thomas
    Thomas avatar
    11 posts
    Member since:
    Jul 2017

    Posted 07 Jan in reply to Petar Mladenov Link to this post

    Hello

     

    Thank you for your answer.

    But as I have an old version of Telerik (2016.R3) I don't have access to the property WebHeaders of the provider exposed since version 2019.

     

    And I can't upgrade my version because of a "fix" (more like a bypass) done in version 2017.R3 to avoid a bug on MapShapeData when a layer is disconnected to the map. Now the layer disconnected to the map is completely disposed and can't be used anymore. So it needs to be recreated completely with all its children.

    As our application uses a lot of layers that can have a lot of children elements this new behavior impacts too much the performance of the application in a bad way (2-5s freeze to display a layer that could be already loaded is too long, actually it's instantaneous as our layer is kept in memory) so we cannot use this new behavior and cannot upgrade our version of Telerik anymore.

     

    So do you have a solution to add this header in the version 2016.R3 please ?

     

    Thank you

    Thomas

  6. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    3142 posts

    Posted 09 Jan Link to this post

    Hi Thomas,

    Being unable to upgrade is bad news to hear, since you lose bug fixes and features. So lets discuss the 'Dispose issue' in the thread 1352082 separately.

    To be honest, even if workaround is applied and user-agent is set, you may experience slower load of tiles. We have already asked openstreet map operations team for this performance issue but we still have no answer.

    I would suggest switching to one of the following:

        - other map provider - for example Bing

        - other map mode in OpenStreetProvider - (Cycle, Transport, Humanitarian) or custom mode which requires building a custom map provider

          RadMap How to implement custom map provider

    The available OpenStreetMap servers are listed here:

       OpenStreet Tile Server List Wiki

    Regards,
    Petar Mladenov
    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.
  7. Thomas
    Thomas avatar
    11 posts
    Member since:
    Jul 2017

    Posted 09 Jan in reply to Petar Mladenov Link to this post

    Hello,

     

    Thank you for your answer, I didn't see that other map provided by OSM don't have this issue of User Agent and therefore the Telerik provider can display them

    So it will fix this problem for us, thank you very much

     

    As for our other issue (to upgrade our version), I found the thread 1352082 that talks about the fix so I already added a comment to explain our problem. So we can continue this discussion on this thread.

     

    Thank you again for your reactivity

    Regards,

    Thomas

Back to Top