You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 2019-07-01 15:54:36
- xByron
- Member
- Registered: 2019-07-01
- Posts: 3
Server returned HTTP response code: 429
Apologies if this is the wrong place to post this!
I pulled a copy of OSM from~ https://github.com/openstreetmap
I made a trivial entry point into it. And I'm getting a Server returned HTTP response code: 429
I've done no other configurations that I'm aware of, and the JMapViewer doesn't have other parameters for further configurations. It also worked at some point as well.
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import org.openstreetmap.gui.jmapviewer.JMapViewer;
public class NewClass {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setLayout(new BorderLayout());
frame.add(new JMapViewer(), BorderLayout.CENTER);
frame.setSize(new Dimension(1200, 800));
frame.setVisible(true);
}
}
Any ideas on what I might need to change or add? Thanks!
Edit: Sample error lines I'm getting:
Failed loading https://c.tile.openstreetmap.org/3/3/2.png: class java.io.IOException: Server returned HTTP response code: 429 for URL: https://b.tile.openstreetmap.org/3/3/2.png
Failed loading https://b.tile.openstreetmap.org/3/1/2.png: class java.io.IOException: Server returned HTTP response code: 429 for URL: https://a.tile.openstreetmap.org/3/1/2.png
Failed loading https://a.tile.openstreetmap.org/3/3/4.png: class java.io.IOException: Server returned HTTP response code: 429 for URL: https://c.tile.openstreetmap.org/3/3/4.png
Failed loading https://c.tile.openstreetmap.org/3/4/1.png: class java.io.IOException: Server returned HTTP response code: 429 for URL: https://b.tile.openstreetmap.org/3/4/1.png
Failed loading https://b.tile.openstreetmap.org/3/4/4.png: class java.io.IOException: Server returned HTTP response code: 429 for URL: https://a.tile.openstreetmap.org/3/4/4.png
The result is a frame with lots of red "X" tiles.
Last edited by xByron (2019-07-03 16:50:01)
Offline
#2 2019-07-02 18:25:41
- alester
- Member
- Registered: 2011-09-21
- Posts: 272
Re: Server returned HTTP response code: 429
I pulled a copy of OSM from~ https://github.com/openstreetmap
Which one did you pull a copy of? There are over 40 different repositories there. We'll need to know if you're trying to set up a tile renderer, a router, a clone of the osm.org website, an editor, a geocoder, etc.
Offline
#3 2019-07-03 16:12:54
- xByron
- Member
- Registered: 2019-07-01
- Posts: 3
Re: Server returned HTTP response code: 429
https://github.com/balloob/JMapViewer/t … jmapviewer
I think I'm using the JMapViewer from this one.~
Offline
#4 2019-07-04 06:29:02
- SimonPoole
- Member
- Registered: 2010-03-14
- Posts: 1,962
Re: Server returned HTTP response code: 429
You are being blocked because you are not setting an application specific user agent string as required by the OSMF ToU.
Offline
#5 2019-07-05 16:16:37
- xByron
- Member
- Registered: 2019-07-01
- Posts: 3
Re: Server returned HTTP response code: 429
Thanks! How do we add a specific user agent string? o.o I don't see any options in the class constructor.
Offline
Pages: 1