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, 16:11

eanton's gravatar image

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, 16:13

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

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, 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, 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, 19:27) SomeoneElse ♦

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, 07:52) eanton

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, 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, 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, 15:08) SimonPoole ♦
showing 5 of 7 show 2 more comments

I think you need to use HTTPS nowadays.

permanent link

answered 18 Mar, 18:14

H_mlet's gravatar image

accept rate: 17%

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, 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:24) H_mlet

Maybe actually reading my answer would help?

(19 Mar, 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, 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.


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, 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, 14:56) SimonPoole ♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 18 Mar, 16:11

question was seen: 200 times

last updated: 21 Mar, 15:08

powered by OSQA