这是我的代码
import processing.core.PApplet;
import de.fhpotsdam.unfolding.UnfoldingMap;
import de.fhpotsdam.unfolding.utils.MapUtils;
public class SimpleMapApp extends PApplet {
UnfoldingMap map;
public void setup() {
size(750, 600,P2D);
map = new UnfoldingMap(this);
MapUtils.createDefaultEventDispatcher(this, map);
}
public void draw() {
map.draw();
}
}
当我运行它时抛出异常:
展开地图v0.9.6
将OpenGLMapDisplay与processing.opengl.PGraphics2D一起使用
java.io.IOException:服务器返回HTTP响应代码:500为URL: http://a.tiles.wmflabs.org/bw-mapnik/2/2/2.png at sun.net.www.protocol.http.HttpURLConnection.getInputStream(未知 来自)java.net.URL.openStream(未知来源)at processing.core.PApplet.createInputRaw(PApplet.java:7233)at processing.core.PApplet.createInput(PApplet.java:7201)at processing.core.PApplet.loadBytes(PApplet.java:7428)at processing.core.PApplet.loadImage(PApplet.java:5867)at de.fhpotsdam.unfolding.tiles.TileLoader.getTileFromUrl(未知来源) 在de.fhpotsdam.unfolding.tiles.TileLoader.run(未知来源)at java.lang.Thread.run(未知来源)
答案 0 :(得分:2)
尝试更改地图提供程序。
//I will be using the data from the form inside data as the data of the ajax call
//Currently data in the form is ignored
function ajaxReq() {
var ajaxSettings = {
'url' : '',
'async' : false,
'type' : 'POST',
'data' : {
'type' : 'SOME_TYPE'
},
'success' : function(data) {
data = JSON.parse(data);
//emptying this part did not change the result
//will be using data here
}
};
$.ajax(ajaxSettings);
return false;
}