2015-01-03 24 views
5

Sto lavorando a un'applicazione che utilizza unfoldingmaps con l'elaborazione.Unfolding SimpleMapApp - File di immagini mancanti

Di seguito è riportato il codice di esempio da svolgersi nella lavorazione

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(); 
} 

Questo è il messaggio di errore che sto ottenendo

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. 

ho cercato di colpire l'URL dal browser - si legge i file di immagine sono stati mosso. Dovrei avere una discarica di questo nel mio sistema locale? Come funziona? Questi URL funzionano per gli altri che utilizzano lo sviluppo?

risposta

1

Per alcune settimane, il servizio di tile della mappa che Unfolding utilizza come predefinito non ha risposto correttamente quando sono passati a WikiMedia Labs. Ora reindirizza e serve di nuovo le immagini delle tessere.

+0

Questo errore avviene ancora quando lo svolgersi-app-template-con-esempi HelloUnfoldingWorld programma .java. Quindi immagino che il reindirizzamento non avvenga ancora. O almeno gli esempi di template non hanno l'ultimo codice aggiornato con il reindirizzamento – dirai

6

Questa è la versione modificata del codice di esempio.

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(); 
    } 

} 

Ho aggiunto

import de.fhpotsdam.unfolding.providers.Google; 

e modificato

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

Ora si sta lavorando

+0

Questa soluzione ha risolto il problema (che esiste ancora con gli schizzi di esempio di unfoldingmaps nell'elaborazione). Quindi questo potrebbe essere accettato come risposta corretta? – black