we are using RadMap with the OpenStreetMapProvider.
Is it possible to get the maps through a secured connection (https).
Our client is not allowed to open http to OpenStreetMap.
I have read that tile serving is possible though ssl.
14 Answers, 1 is accepted
To download map tiles via https connection, you need to override the URI string which are used for accessing the openstreet maps. You can create custom map provider with custom map sources. Please check out the article and the following code which actually overrides the 4 connection strings used by the OpenStreetProvider:
RadMap Implement Custom Map Provider
It appears the HTTPS prefix from the URI string is replaced in later stage (when building the URI for download). We changed the solution to replace "http" wiith "https" at the final stage before downloading a specific tile:
Please give it a try and let us know how it goes on your side.
Thank you Petar this solution worked for us!
I also had to change our web app - where we also used RadMap:
Hi all. it is a couple of days that I am having problems in retrieving the tile from the OpenStreetProvider via https connection.
I'm getting the following message for each tile request I do: "429 Too Many Requests"
No problem if I use a http connection.
Does someone know the reason?
Tnx in advance
I reproduced this "429" error but we are still not sure regarding its root cause. I submitted a question in OpenStreetMap forum:
Also I tested this in our Kendo UI map:
Map works fine with HTTPs but I guess this is routed from other IP address.
Can you share more details regarding your WPF and Web maps - do you experience difference in them or they both started failing in the same day ?
thx for the responce.
I saw that the question you submitted to OpenstreetMap has been closed as:
"The question has been closed for the following reason "Duplicate Question" by Frederik Ramm 44 mins ago".
Digging inside the forum i found the following page: "https://operations.osmfoundation.org/policies/nominatim/"
From some testing it looks like that if the request has the "UserAgent" header filled the GET request has a response.
Hope this can help in finding a solution.
Apparently, I have submitted 2 posts while waiting for my registration completes. Here is the open thread:
Can you send me the post you have read regarding the UserAgent header ?
The page is:
- No heavy uses (an absolute maximum of 1 request per second).
- Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do).
- Clearly display attribution as suitable for your medium.
- Data is provided under the ODbL license which requires to share alike (although small extractions are likely to be covered by fair usage / fair dealing).
I added the user-agent header and got a OK response
This article could be useful too:
Thank you very much for the provided resources.
Indeed, it seems that specifying a non-stock user agent for the request correctly downloads the tiles via https.
Thus, we plan to introduce a new WebHeaders property of the MultiScaleTileSource (from which the OpenStreetMapnikSource inherits) through which you can add any headers you require (such as User-Agent and Referrer). You will then be able to set the user-agent of the requests like so:
This property will be available with our Service Pack which will be introduced in the middle of next week.
Please let us know whether you would find this new property helpful.
is this Fix released? We installed the latest version and the property WebHeaders is NOT defined.
We have to release our product with https map support and we can't due to this failure.
Please tell us where to get the fix or service pack.
The WebHeaders property of the MultiScaleTileSource class was officially introduced with the 2019.2.618 version of our controls. The release notes for this service pack can be found here.
Can you please confirm that you're using this or a newer version of the suite? If this is the case, please provide a small sample project or code snippet of your setup so that I can further investigate and assist you.
you are right - with the new version the propertys WebHeaders exists and all works fine.