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

Hi,

I am currently creating a slippy map for Java. Not Javascript, Java. The tile usage policy appears to be geared more towards using a browser, which I am not. Can somebody clarify it for me?

Valid User-Agent identifying application. Faking another app's User-Agent WILL get you blocked.

What do i use for a user-agent identifier?

Maximum of 2 download threads. (Unmodified web browsers' download thread limits are acceptable.) Note: modern web browsers in standard configuration generally pass all the above technical requirements.

So I can only request one thread to http://[abc].tile.openstreetmap.org/zoom/x/y.png

eg.

my api requests: http://a.tile.opentstreetmap.org/8/2323/5465.png and http://b.tile.opentstreetmap.org/8/4542/7657.png but it can't make another request like this: http://c.tile.opentstreetmap.org/8/56565/7867.png until a and b are finished loading?

Also can I send two requests to the same server? so i send two requests to a and b?

thank you!

asked 04 Aug '11, 18:24

meerkat_aicml's gravatar image

meerkat_aicml
6112
accept rate: 0%

2

You may want to take a look at: http://wiki.openstreetmap.org/wiki/LiveMapViewer It is written in java, it uses "slippy map" and it's source code is available.

(04 Aug '11, 19:26) RM87
2

Have a look at JMapViewer ( http://trac.openstreetmap.org/browser/applications/viewer/jmapviewer )

JMapViewer is a Java Swing component for integrating OSM maps in to your Java application.

LiveEditMapViewer mentioned in the comment above uses jmapviewer as its slippy map component.

(05 Aug '11, 22:18) apmon

The User-Agent is the name of your program. It is important for identifying what application is violating the terms and can be used to block those versions of the program.

There are currently only two servers that are serving tiles. The [abc].tile.openstreetmap.org and tile.openstreetmap.org each map to one of theese two servers. The most important is that you do not send to many requests to the servers at once. The problem is people that are downloading a lot of tiles for offload use where most tiles are not displayed to any users.

If you are woried that you may download too many tiles too fast you can always set up your own tile server.

permanent link

answered 04 Aug '11, 19:30

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

edited 07 Aug '11, 14:14

dieterdreist's gravatar image

dieterdreist
3.7k113567

Thank you for clarifying. Out of curiosity how many requests is too many?

(04 Aug '11, 20:29) meerkat_aicml
3

The statement about the two servers is incorrect - all addresses map to the same cache server, and there is another server generating tiles behind that.

In any case, the "2 threads" limit are to any and all addresses combined. So if you wanted to use two addresses, you could only download 1 tile at a time from each.

(05 Aug '11, 09:17) Andy Allan

Okay so would it be any faster to use two addresses than one? Or would the server treat both requests the same?

(05 Aug '11, 16:37) meerkat_aicml
1

Just for the record, [abc].tile do currently map onto two caching servers (konqi,albi), which are front ends to a single server.

Funnily enough, the aliases [abc] are actually there explicitly to violate this policy of two threads. By default browsers only open n simultanoius connections per domain. In order to get the browser to open more simultanious connections and reduce latency, aliases are introduced which each get n connections.

So in Java it doesn't really matter to which server you connect and you might as well only use tile.osm.org, although in future that might change.

(05 Aug '11, 22:34) apmon
3

The policies are generally written to prevent server overload from massive automated downloads, that can quickly rack up 10.000s of tiles.

The policy kind of works as "if it causes troubles to the servers" it is "illegal". If the load is low and no admin notices it is fine. So what is allowed and what not is kind of fuzzy.

To get an indication of what gets noticed: http://wiki.openstreetmap.org/wiki/Talk:Tile_usage_policy#Usage_stats_for_Monday_1st_March_2010 http://munin.openstreetmap.org/openstreetmap/yevaud.openstreetmap/index.html#mod_tile

(05 Aug '11, 22:41) apmon
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:

×290
×104
×76
×8

question asked: 04 Aug '11, 18:24

question was seen: 8,754 times

last updated: 07 Aug '11, 14:14

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