Hi All,

I am using OSM for my application which is hosted on tomcat. Application is accessible only via https as a result of it http calls made to get tile on open e.g. :- http://tile.openstreetmap.org/3/2/1.png would fail. Since security violation ...

I thought of creating a proxy via a servlet i have shown code below used in doGet ...this wont work

URL url = new URL("http://tile.openstreetmap.org/3/2/1.png"); BufferedImage bimg = ImageIO.read(url); response.setContentType("image/png"); OutputStream outputStream = response.getOutputStream(); ImageIO.write(bimg, "png", outputStream); outputStream.close();

error i get is - Caused by: java.net.SocketException: Software caused connection abort: recv failed

Can anyone tell me what could be an issue? I have used the same code above pointing to different site to get an image and it works just fine....

asked 11 Nov '11, 16:35

Mayank's gravatar image

Mayank
1111
accept rate: 0%

What useragent would osm see your servlet proxy using? I don't know whether it is going to be the problem, but I think some are blocked. It might help someone who knows more about the technical aspects to answer, though.

(11 Nov '11, 16:43) EdLoach ♦

actually i am not passing useragent ... let me try that and will keep u posted

(11 Nov '11, 16:48) Mayank

i happen to come across this link http://wiki.openstreetmap.org/wiki/Tile_usage_policy

i tried using Alternative tile server from http://tile.openstreetmap.org/3/2/1.png to http://a.tile.openstreetmap.org/3/2/1.png and the code works... i am not sure what is going on....

why are the same restrictions not applied to http://a.tile..... as that of http://tile...

Any advice?

(11 Nov '11, 17:03) Mayank
Be the first one to answer this question!
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:

×546
×6
×1

question asked: 11 Nov '11, 16:35

question was seen: 3,190 times

last updated: 11 Nov '11, 17:03

powered by OSQA