NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am very new at OpenStreetMap and I could really use your help. I have to support a c#.net windows application that used the uri http://{0}.tile.openstreetmap.org/{1}/{2}/{3}.png in order to render a map location. In the last months the tiles do not get created, its just an empty map with the location pin visible.Is there a new licence or a different tile provider uri?Can you please guide me into fixing the issue?

Thank you in advance

asked 18 Mar '20, 16:11

eanton's gravatar image

eanton
11111
accept rate: 0%


There is nothing new, some restrictions that have existed for a long time are now, technically, better enforced. See https://operations.osmfoundation.org/policies/tiles/

permanent link

answered 18 Mar '20, 16:13

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

Thank you for the instant reply.The problem is that the framework for UI Controls that is being used to load the map, is older and I cannot access referer or user agent fields.Is there another way?

(18 Mar '20, 16:18) eanton

You will need to discuss this with the operations working group operations@osmfoundation.org but your best bet is fixing the framework.

(18 Mar '20, 17:56) SimonPoole ♦

If you post a standalone snippet of code somewhere that displays the problem I suspect that someone would be able to advise on how to resolve the problem (we're assuming that we know what the problem is).

(18 Mar '20, 19:27) SomeoneElse ♦
1

The UI framework used is Devexpress v13.2.There is just a mapControl that created an image Layer with TileUriTemplate as http://{0}.tile.openstreetmap.org/{1}/{2}/{3}.png

The answer of Devexpress suppport is: The public OpenStreetMap server changed its configuration (see the OpenStreetMap provider does not display Basic tiles in the MapControl demo application ticket for additional information). Now it requires User Agent and Referrer information.

However, there is no capability to specify the Referrer value in an older version (v13.2) because we introduced the e.Referer property when migrating MapControl providers to REST API in v16.1.

Since the public OSM server has some limitations and limited bandwidth (see the Tile Usage Policy article), a better solution is to use alternative tile servers or host a custom tile server and set the TileUriTemplate property accordingly.

(19 Mar '20, 07:52) eanton
1

Have you discussed this with the OWG? If the framework is sending a fake user agent header, you could try binary patching it (extreme measure but perhaps worth a try), it is OK to send an empty referrer for apps, so that shouldn't be an issue in itself.

(19 Mar '20, 08:43) SimonPoole ♦

Default User-Agent of devexpress before 19.4 is not fake, it's just used by all users of any apps using that framework, according to their ticket, so it was blocked.

Other solution might be to point your requests through a proxy, which would cache data so that all your users share the same cache, and would set the User-Agent accordingly. I guess this would respect OSM Tile Server ToU.

Otherwise you could go to another, less restrictive or payed-for, tile server.

Of course the best course would to upgrade your framework, but I understand this might be complicated.

(19 Mar '20, 15:44) H_mlet

If you had actually looked at the ticket you are referencing you would have noticed that the library is not actually setting the user agent header at all. Which in turn implies that it will not be possible to binary patch it, which would have been a real way out of the issue.

(21 Mar '20, 15:08) SimonPoole ♦
showing 5 of 7 show 2 more comments
-1

I think you need to use HTTPS nowadays.

permanent link

answered 18 Mar '20, 18:14

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

http tile requests are redirected to https, so except if that is an issue with the framework (rather unlikely for c# / .net) that is not the issue.

(18 Mar '20, 18:26) SimonPoole ♦

Well, I don't know which framework we're talking about, but it's quite common for older stuff to either not follow redirections, or not support HTTPS, or even reject legit certificates.

Try with curl !

And contrary to your answer, it's a recent change which broke some applications.

(18 Mar '20, 20:24) H_mlet

Maybe actually reading my answer would help?

(19 Mar '20, 08:45) SimonPoole ♦

Well thanks, I did. The link you provided without explanation implies that a default UA and an empty referer should work, except if that UA was used to abuse the servers. I did not say you are wrong, I try to help with other possible problems.

All I'm saying is that some applications recently broke because of the switch to HTTPS only.

Some old frameworks are bad at ssl, outdated ciphers or certificate chains can block any attempt.

Curl requires a command-line switch to follow redirection (-L).

But to be honest, after some testing, I don't understand how the redirection works. Curl seems to download the tile using http only without trouble, but my browser redirects to https, with no separate request.

This code suggest that it's a usual http 301 redirection, but I can't find it from my side, maybe it was reverted.

(19 Mar '20, 15:26) H_mlet

Some older versions of some devexpress components or plugins do use a way to old version of a library called INDY that is still not able to handle SSL.

So I wouldn't downvote this but rather wait for some devexpress experts here or at the devexpress studio ticketing community that can confirm in which versions or components you'll see these problems.

@eanton:

For testing I would recommend to sign up for an api key here and than use "https://maptiles.p.rapidapi.com/local/osm/v1/{1}/{2}/{3}.png?rapidapi-key=<your-api-key>" (replace <your-api-key> with the one you get by signing up) as a TileUriTemplate to check if your devexpress version can handle SSL. If that does work you don't have a SSL problem but one with missing headers as stated in the other answer by SimonPoole and should either update your devpexress version or use a different tile provider.

(21 Mar '20, 11:20) Spiekerooger

We already established that devexpress 13.2 does not support setting the required headers two days ago, see the information from the company itself, and is not going to work.

(21 Mar '20, 14:56) SimonPoole ♦
showing 5 of 6 show 1 more comments

Thank you all for your answers!Seems that I m gonna have to upgrade to new version if I want to keep using Devexpress.I tried it in a trial version in Devexpress 17 and it is working.The other option I tried is Gmap.But I would like to ask if since I only want to load a location on the map just for viewing, what is the cost if I m going to use GoogleMapProvider with GMap?I tried creating a map using GMap and I got to load my location with GoogleMapProvider without having any problems.Do you know the charges in case I use Gmap with GoogleMapProvider?Why dont I get any messages or warnings about using Google Maps?? Thank you once again

permanent link

answered 13 Apr '20, 11:13

eanton's gravatar image

eanton
11111
accept rate: 0%

Thank you all for your answers!Seems that I m gonna have to upgrade to new version if I want to keep using Devexpress.I tried it in a trial version in Devexpress 17 and it is working.The other option I tried is Gmap.But I would like to ask if since I only want to load a location on the map just for viewing, what is the cost if I m going to use GoogleMapProvider with GMap?I tried creating a map using GMap and I got to load my location with GoogleMapProvider without having any problems.Do you know the charges in case I use Gmap with GoogleMapProvider?Why dont I get any messages or warnings about using Google Maps that I should pay the usage or something?? Thank you once again

permanent link

answered 13 Apr '20, 11:14

eanton's gravatar image

eanton
11111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×287
×204
×8

question asked: 18 Mar '20, 16:11

question was seen: 3,513 times

last updated: 13 Apr '20, 11:14

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum