5

我正在开发一个使用展开图进行处理的应用程序。

以下是在处理中展开的示例代码

import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.utils.*; 

UnfoldingMap map;

void setup() {
    size(800, 600, P2D);
    map = new UnfoldingMap(this);
    MapUtils.createDefaultEventDispatcher(this, map);
}

void draw() {
    map.draw();
}

这是我收到的错误消息

The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/1/2.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/2/3.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/2/2.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/2/1.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/3/1.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/3/2.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/1/3.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/3/3.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/0/2.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/2/0.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/1/0.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/0/3.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/0/1.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/0/0.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/3/0.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "http://a.www.toolserver.org/tiles/bw-mapnik/2/1/1.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.

我尝试从浏览器中点击 url - 它说图像文件已被移动。我应该在我的本地系统中得到这个转储吗?这是如何运作的?这些 URL 是否适用于其他使用展开的 URL?

4

2 回答 2

7

这是示例代码的修改版本。

import processing.core.PApplet;
import de.fhpotsdam.unfolding.UnfoldingMap;
import de.fhpotsdam.unfolding.geo.Location;
import de.fhpotsdam.unfolding.utils.MapUtils;
import de.fhpotsdam.unfolding.providers.Google;
public class HelloUnfoldingWorld extends PApplet {

    UnfoldingMap map;

    public void setup() {
        size(800, 600, OPENGL);

        map = new UnfoldingMap(this, new Google.GoogleMapProvider());
        map.zoomAndPanTo(10, new Location(52.5f, 13.4f));

        MapUtils.createDefaultEventDispatcher(this, map);
    }

    public void draw() {
        background(0);
        map.draw();
    }

}

我已经添加了

import de.fhpotsdam.unfolding.providers.Google;

并修改

map = new UnfoldingMap(this, new Google.GoogleMapProvider());

现在它正在工作

于 2016-04-21T02:33:27.947 回答
1

几周以来,Unfolding 默认使用的地图图块服务在转移到 WikiMedia Labs 时没有正确响应。现在它重定向,并再次提供平铺图像。

于 2015-02-16T11:10:28.263 回答