Changeset 498
- Timestamp:
- 02/18/08 19:01:41 (9 months ago)
- Files:
-
- trunk/processing/Makefile (modified) (1 diff)
- trunk/processing/sketches/modest_maps_interactive/code/modestmaps.jar (modified) (previous)
- trunk/processing/src/com/modestmaps/core (added)
- trunk/processing/src/com/modestmaps/core/Coordinate.java (moved) (moved from trunk/processing/src/com/modestmaps/Coordinate.java) (1 diff)
- trunk/processing/src/com/modestmaps/core/MapCenter.java (moved) (moved from trunk/processing/src/com/modestmaps/MapCenter.java) (1 diff)
- trunk/processing/src/com/modestmaps/core/Point2f.java (moved) (moved from trunk/processing/src/com/modestmaps/Point2f.java) (1 diff)
- trunk/processing/src/com/modestmaps/geo (added)
- trunk/processing/src/com/modestmaps/geo/AbstractProjection.java (moved) (moved from trunk/processing/src/com/modestmaps/AbstractProjection.java) (1 diff)
- trunk/processing/src/com/modestmaps/geo/LinearProjection.java (moved) (moved from trunk/processing/src/com/modestmaps/LinearProjection.java) (1 diff)
- trunk/processing/src/com/modestmaps/geo/Location.java (moved) (moved from trunk/processing/src/com/modestmaps/Location.java) (1 diff)
- trunk/processing/src/com/modestmaps/geo/MercatorProjection.java (moved) (moved from trunk/processing/src/com/modestmaps/MercatorProjection.java) (1 diff)
- trunk/processing/src/com/modestmaps/geo/Transformation.java (moved) (moved from trunk/processing/src/com/modestmaps/Transformation.java) (1 diff)
- trunk/processing/src/com/modestmaps/InteractiveMap.java (moved) (moved from trunk/processing/sketches/modest_maps_interactive/InteractiveMap.java) (18 diffs)
- trunk/processing/src/com/modestmaps/providers (added)
- trunk/processing/src/com/modestmaps/providers/AbstractMapProvider.java (moved) (moved from trunk/processing/src/com/modestmaps/AbstractMapProvider.java) (1 diff)
- trunk/processing/src/com/modestmaps/providers/Google.java (moved) (moved from trunk/processing/src/com/modestmaps/Google.java) (5 diffs)
- trunk/processing/src/com/modestmaps/providers/Microsoft.java (moved) (moved from trunk/processing/src/com/modestmaps/Microsoft.java) (3 diffs)
- trunk/processing/src/com/modestmaps/providers/Yahoo.java (moved) (moved from trunk/processing/src/com/modestmaps/Yahoo.java) (3 diffs)
- trunk/processing/src/com/modestmaps/StaticMap.java (moved) (moved from trunk/processing/src/com/modestmaps/MMap.java) (6 diffs)
- trunk/processing/src/com/modestmaps/Tiles.java (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/processing/Makefile
r490 r498 1 1 modestmaps.jar: 2 javac src/com/modestmaps/*.java -cp lib/core.jar -d classes2 javac -sourcepath src/ -cp lib/core.jar -d classes src/com/modestmaps/*.java src/com/modestmaps/core/*.java src/com/modestmaps/providers/*.java src/com/modestmaps/geo/*.java 3 3 jar cvf modestmaps.jar -C classes . 4 4 trunk/processing/src/com/modestmaps/core/Coordinate.java
r493 r498 1 package com.modestmaps ;1 package com.modestmaps.core; 2 2 3 3 import processing.core.*; trunk/processing/src/com/modestmaps/core/MapCenter.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.core; 2 2 3 3 public class MapCenter { trunk/processing/src/com/modestmaps/core/Point2f.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.core; 2 2 3 3 import processing.core.*; trunk/processing/src/com/modestmaps/geo/AbstractProjection.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.geo; 2 2 3 3 import processing.core.*; 4 import com.modestmaps.core.*; 4 5 5 6 public abstract class AbstractProjection { trunk/processing/src/com/modestmaps/geo/LinearProjection.java
r485 r498 1 package com.modestmaps; 1 package com.modestmaps.geo; 2 3 import com.modestmaps.core.Point2f; 2 4 3 5 public class LinearProjection extends AbstractProjection { trunk/processing/src/com/modestmaps/geo/Location.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.geo; 2 2 3 3 import processing.core.*; trunk/processing/src/com/modestmaps/geo/MercatorProjection.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.geo; 2 2 3 3 import processing.core.*; 4 import com.modestmaps.core.Point2f; 4 5 5 6 public class MercatorProjection extends AbstractProjection { trunk/processing/src/com/modestmaps/geo/Transformation.java
r485 r498 1 package com.modestmaps; 1 package com.modestmaps.geo; 2 3 import com.modestmaps.core.Point2f; 2 4 3 5 public class Transformation { trunk/processing/src/com/modestmaps/InteractiveMap.java
r497 r498 1 2 import com.modestmaps.*; 1 package com.modestmaps; 2 3 3 import processing.core.*; 4 4 import java.util.*; 5 import com.modestmaps.geo.*; 6 import com.modestmaps.core.*; 7 import com.modestmaps.providers.*; 5 8 6 9 public class InteractiveMap implements PConstants { … … 8 11 // I have made the dumb mistake of getting these wrong before... 9 12 // it's REALLY unlikely you'll want to change them: 10 int TILE_WIDTH = 256;11 int TILE_HEIGHT = 256;13 public int TILE_WIDTH = 256; 14 public int TILE_HEIGHT = 256; 12 15 13 16 // unavoidable right now, for loadImage and float maths 14 PApplet p;17 public PApplet p; 15 18 16 19 // pan and zoom 17 double tx = -TILE_WIDTH/2; // half the world width, at zoom 018 double ty = -TILE_HEIGHT/2; // half the world height, at zoom 019 double sc = 1;20 public double tx = -TILE_WIDTH/2; // half the world width, at zoom 0 21 public double ty = -TILE_HEIGHT/2; // half the world height, at zoom 0 22 public double sc = 1; 20 23 21 24 // limit simultaneous calls to loadImage 22 int MAX_PENDING = 4;25 public int MAX_PENDING = 4; 23 26 24 27 // limit tiles in memory 25 28 // 256 would be 64 MB, you may want to lower this quite a bit for your app 26 int MAX_IMAGES_TO_KEEP = 256;29 public int MAX_IMAGES_TO_KEEP = 256; 27 30 28 31 // upping this can help appearances when zooming out, but also loads many more tiles 29 int GRID_PADDING = 1;32 public int GRID_PADDING = 1; 30 33 31 34 // what kinda maps? 32 AbstractMapProvider provider;35 public AbstractMapProvider provider; 33 36 34 37 // how big? 35 float width, height;38 public float width, height; 36 39 37 40 // loading tiles 38 Hashtable pending = new Hashtable(); // coord -> TileLoader41 public Hashtable pending = new Hashtable(); // coord -> TileLoader 39 42 // loaded tiles 40 Hashtable images = new Hashtable(); // coord -> PImage43 public Hashtable images = new Hashtable(); // coord -> PImage 41 44 // coords waiting to load 42 Vector queue = new Vector();45 public Vector queue = new Vector(); 43 46 // a list of the most recent MAX_IMAGES_TO_KEEP PImages we've seen 44 Vector recentImages = new Vector();47 public Vector recentImages = new Vector(); 45 48 46 49 // for sorting coordinates by zoom 47 ZoomComparator zoomComparator = new ZoomComparator();50 public ZoomComparator zoomComparator = new ZoomComparator(); 48 51 49 52 // for loading tiles from the inside first 50 QueueSorter queueSorter = new QueueSorter();53 public QueueSorter queueSorter = new QueueSorter(); 51 54 52 55 /** default to Microsoft Hybrid */ 53 InteractiveMap(PApplet p) {56 public InteractiveMap(PApplet p) { 54 57 this(p, new Microsoft.HybridProvider()); 55 58 } 56 59 57 60 /** new map using applet width and height, and given provider */ 58 InteractiveMap(PApplet p, AbstractMapProvider provider) {61 public InteractiveMap(PApplet p, AbstractMapProvider provider) { 59 62 this(p, provider, p.width, p.height); 60 63 } 61 64 62 65 /** make a new interactive map, using the given provider, of the given width and height */ 63 InteractiveMap(PApplet p, AbstractMapProvider provider, float width, float height) {66 public InteractiveMap(PApplet p, AbstractMapProvider provider, float width, float height) { 64 67 65 68 this.p = p; … … 74 77 75 78 /** draw the map on the given PApplet */ 76 void draw() {79 public void draw() { 77 80 78 81 // remember smooth setting so it can be reset … … 245 248 246 249 /** @return zoom level of currently visible tile layer */ 247 int getZoom() {250 public int getZoom() { 248 251 return bestZoomForScale((float)sc); 249 252 } 250 253 251 Location getCenter() {254 public Location getCenter() { 252 255 return provider.coordinateLocation(getCenterCoordinate()); 253 256 } 254 257 255 Coordinate getCenterCoordinate() {258 public Coordinate getCenterCoordinate() { 256 259 float row = (float)(ty*sc/-TILE_WIDTH); 257 260 float column = (float)(tx*sc/-TILE_HEIGHT); … … 260 263 } 261 264 262 void setCenter(Coordinate center) {265 public void setCenter(Coordinate center) { 263 266 //println("setting center to " + center); 264 267 sc = p.pow(2.0f, center.zoom); … … 267 270 } 268 271 269 void setCenter(Location location) {272 public void setCenter(Location location) { 270 273 setCenter(provider.locationCoordinate(location).zoomTo(getZoom())); 271 274 } 272 275 273 void setCenterZoom(Location location, int zoom) {276 public void setCenterZoom(Location location, int zoom) { 274 277 setCenter(provider.locationCoordinate(location).zoomTo(zoom)); 275 278 } 276 279 277 280 /** sets scale according to given zoom level, should leave you with pixel perfect tiles */ 278 void setZoom(int zoom) {281 public void setZoom(int zoom) { 279 282 sc = p.pow(2.0f, zoom-1); 280 283 } 281 284 282 void zoom(int dir) {285 public void zoom(int dir) { 283 286 sc = p.pow(2.0f, getZoom()+dir); 284 287 } 285 288 286 void zoomIn() {289 public void zoomIn() { 287 290 sc = p.pow(2.0f, getZoom()+1); 288 291 } 289 292 290 void zoomOut() {293 public void zoomOut() { 291 294 sc = p.pow(2.0f, getZoom()-1); 292 295 } … … 303 306 // public function getCenterZoom():Array 304 307 305 AbstractMapProvider getMapProvider() {308 public AbstractMapProvider getMapProvider() { 306 309 return this.provider; 307 310 } 308 311 309 void setMapProvider(AbstractMapProvider provider) {312 public void setMapProvider(AbstractMapProvider provider) { 310 313 if (this.provider.getClass() != provider.getClass()) { 311 314 this.provider = provider; … … 316 319 } 317 320 318 Point2f locationPoint(Location location) {321 public Point2f locationPoint(Location location) { 319 322 PMatrix m = new PMatrix(); 320 323 m.translate(width/2, height/2); … … 331 334 } 332 335 333 Location pointLocation(Point2f point) {336 public Location pointLocation(Point2f point) { 334 337 return pointLocation(point.x, point.y); 335 338 } 336 339 337 Location pointLocation(float x, float y) {340 public Location pointLocation(float x, float y) { 338 341 339 342 // TODO: create this matrix once and keep it around for drawing and projecting … … 361 364 362 365 // TODO: pan by proportion of screen size, not by coordinate grid 363 void panUp() {366 public void panUp() { 364 367 setCenter(getCenterCoordinate().up()); 365 368 } 366 void panDown() {369 public void panDown() { 367 370 setCenter(getCenterCoordinate().down()); 368 371 } 369 void panLeft() {372 public void panLeft() { 370 373 setCenter(getCenterCoordinate().left()); 371 374 } 372 void panRight() {375 public void panRight() { 373 376 setCenter(getCenterCoordinate().right()); 374 377 } 375 378 376 void panAndZoomIn(Location location) {379 public void panAndZoomIn(Location location) { 377 380 // TODO: animate 378 381 setCenterZoom(location, getZoom() + 1); 379 382 } 380 383 381 void panTo(Location location) {384 public void panTo(Location location) { 382 385 // TODO: animate 383 386 setCenter(location); … … 410 413 /////////////////////////////////////////////////////////////////////// 411 414 412 float scaleForZoom(int zoom) {415 public float scaleForZoom(int zoom) { 413 416 return p.pow(2.0f, zoom); 414 417 } 415 418 416 float zoomForScale(float scale) {419 public float zoomForScale(float scale) { 417 420 return p.log(scale) / p.log(2); 418 421 } 419 422 420 int bestZoomForScale(float scale) {423 public int bestZoomForScale(float scale) { 421 424 return (int)p.min(20, p.max(1, (int)p.round(p.log(scale) / p.log(2)))); 422 425 } … … 424 427 ////////////////////////////////////////////////////////////////////////// 425 428 426 void mouseDragged() {429 public void mouseDragged() { 427 430 double dx = (double)(p.mouseX - p.pmouseX) / sc; 428 431 double dy = (double)(p.mouseY - p.pmouseY) / sc; … … 438 441 ///////////////////////////////////////////////////////////////// 439 442 440 void grabTile(Coordinate coord) {443 public void grabTile(Coordinate coord) { 441 444 if (!pending.containsKey(coord) && !queue.contains(coord) && !images.containsKey(coord)) { 442 445 // println("adding " + coord.toString() + " to queue"); … … 445 448 } 446 449 447 class TileLoader implements Runnable {450 public class TileLoader implements Runnable { 448 451 Coordinate coord; 449 452 TileLoader(Coordinate coord) { … … 467 470 // TODO: there could be issues when this is called from within a thread 468 471 // probably needs synchronizing on images / pending / queue 469 void tileDone(Coordinate coord, PImage img) {472 public void tileDone(Coordinate coord, PImage img) { 470 473 // check if we're still waiting for this (new provider clears pending) 471 474 // also check if we got something … … 487 490 } 488 491 489 void processQueue() {492 public void processQueue() { 490 493 while (pending.size() < MAX_PENDING && queue.size() > 0) { 491 494 Coordinate coord = (Coordinate)queue.remove(0); … … 496 499 } 497 500 498 class QueueSorter implements Comparator {501 public class QueueSorter implements Comparator { 499 502 Coordinate center; 500 503 public void setCenter(Coordinate center) { … … 525 528 } 526 529 527 class ZoomComparator implements Comparator {530 public class ZoomComparator implements Comparator { 528 531 public int compare(Object o1, Object o2) { 529 532 Coordinate c1 = (Coordinate)o1; trunk/processing/src/com/modestmaps/providers/AbstractMapProvider.java
r493 r498 1 package com.modestmaps ;1 package com.modestmaps.providers; 2 2 3 3 import processing.core.*; 4 import com.modestmaps.core.*; 5 import com.modestmaps.geo.*; 4 6 5 7 public abstract class AbstractMapProvider { trunk/processing/src/com/modestmaps/providers/Google.java
r485 r498 1 1 2 package com.modestmaps ;2 package com.modestmaps.providers; 3 3 4 4 import processing.core.*; 5 import com.modestmaps.core.*; 6 import com.modestmaps.geo.*; 5 7 6 8 public class Google { … … 35 37 } 36 38 public String getZoomString(Coordinate coordinate) { 37 Coordinate coord = Tiles.toGoogleRoad(coordinate.container());39 Coordinate coord = toGoogleRoad(coordinate.container()); 38 40 return "x=" + (int)coord.column + "&y=" + (int)coord.row + "&zoom=" + (int)coord.zoom; 39 41 } … … 46 48 } 47 49 public String getZoomString(Coordinate coordinate) { 48 return Tiles.toGoogleAerial(coordinate.container());50 return toGoogleAerial(coordinate.container()); 49 51 } 50 52 } … … 57 59 } 58 60 public String getZoomString(Coordinate coordinate) { 59 Coordinate coord = Tiles.toGoogleRoad(coordinate.container());61 Coordinate coord = toGoogleRoad(coordinate.container()); 60 62 return "x=" + (int)coord.column + "&y=" + (int)coord.row + "&zoom=" + (int)coord.zoom; 61 63 } … … 68 70 } 69 71 } 72 73 public static Coordinate fromGoogleRoad(Coordinate coord) { 74 // Return column, row, zoom for Google Road tile x, y, z. 75 return new Coordinate(coord.row, coord.column, 17 - coord.zoom); 76 } 77 78 public static Coordinate toGoogleRoad(Coordinate coord) { 79 // Return x, y, z for Google Road tile column, row, zoom. 80 return new Coordinate(coord.row, coord.column, 17 - coord.zoom); 81 } 82 83 public static Coordinate fromGoogleAerial(String s) { 84 // Return column, row, zoom for Google Aerial tile string. 85 String rowS = ""; 86 String colS = ""; 87 for (int i = 0; i < s.length(); i++) { 88 switch (s.charAt(i)) { 89 case 't': 90 rowS += '0'; 91 colS += '0'; 92 break; 93 case 's': 94 rowS += '0'; 95 colS += '1'; 96 break; 97 case 'q': 98 rowS += '1'; 99 colS += '0'; 100 break; 101 case 'r': 102 rowS += '1'; 103 colS += '1'; 104 break; 105 } 106 } 107 int row = PApplet.unbinary(rowS); 108 int col = PApplet.unbinary(colS); 109 int zoom = s.length() - 1; 110 row = (int)PApplet.pow(2, zoom) - row - 1; 111 return new Coordinate( row, col, zoom ); 112 } 113 114 public static String toGoogleAerial(Coordinate coord) { 115 // Return string for Google Road tile column, row, zoom. 116 int x = (int)coord.column; 117 int y = (int)PApplet.pow(2, coord.zoom) - (int)coord.row - 1; 118 int z = (int)coord.zoom + 1; 119 String yb = PApplet.binary(y,z); 120 String xb = PApplet.binary(x,z); 121 String string = ""; 122 String googleToCorners = "tsqr"; 123 for (int c = 0; c < z; c++) { 124 string += googleToCorners.charAt(PApplet.unbinary("" + yb.charAt(c) + xb.charAt(c))); 125 } 126 return string; 127 } 128 129 70 130 71 131 } trunk/processing/src/com/modestmaps/providers/Microsoft.java
r485 r498 1 package com.modestmaps ;1 package com.modestmaps.providers; 2 2 3 3 import processing.core.*; 4 import com.modestmaps.core.*; 5 import com.modestmaps.geo.*; 4 6 5 7 public class Microsoft { … … 12 14 13 15 public String getZoomString(Coordinate coordinate) { 14 return Tiles.toMicrosoft( (int)coordinate.column, (int)coordinate.row, (int)coordinate.zoom );16 return toMicrosoft( (int)coordinate.column, (int)coordinate.row, (int)coordinate.zoom ); 15 17 } 16 18 … … 51 53 } 52 54 55 public static Coordinate fromMicrosoft(String s) { 56 // Return column, row, zoom for Microsoft tile string. 57 String rowS = ""; 58 String colS = ""; 59 for (int i = 0; i < s.length(); i++) { 60 int v = Integer.parseInt("" + s.charAt(i)); 61 String bv = PApplet.binary(v,2); 62 rowS += bv.charAt(0); 63 colS += bv.charAt(1); 64 } 65 return new Coordinate(PApplet.unbinary(colS), PApplet.unbinary(rowS), s.length()); 66 } 67 68 public static String toMicrosoft(int col, int row, int zoom) { 69 // Return string for Microsoft tile column, row, zoom 70 String y = PApplet.binary(row, zoom); 71 String x = PApplet.binary(col, zoom); 72 String out = ""; 73 for (int i = 0; i < zoom; i++) { 74 out += PApplet.unbinary("" + y.charAt(i) + x.charAt(i)); 75 } 76 return out; 77 } 78 79 public static Coordinate fromMicrosoftRoad(String s) { 80 // Return column, row, zoom for Microsoft Road tile string. 81 return fromMicrosoft(s); 82 } 83 84 public static String toMicrosoftRoad(int col, int row, int zoom) { 85 // Return x, y, z for Microsoft Road tile column, row, zoom. 86 return toMicrosoft(col, row, zoom); 87 } 88 89 90 public static Coordinate fromMicrosoftAerial(String s) { 91 // Return column, row, zoom for Microsoft Aerial tile string. 92 return fromMicrosoft(s); 93 } 94 95 public static String toMicrosoftAerial(int col, int row, int zoom) { 96 // Return x, y, z for Microsoft Aerial tile column, row, zoom. 97 return toMicrosoft(col, row, zoom); 98 } 99 53 100 } trunk/processing/src/com/modestmaps/providers/Yahoo.java
r486 r498 1 1 2 package com.modestmaps; 2 package com.modestmaps.providers; 3 4 import processing.core.*; 5 import com.modestmaps.core.*; 6 import com.modestmaps.geo.*; 3 7 4 8 public class Yahoo { … … 15 19 16 20 public static String getZoomString(Coordinate coordinate) { 17 coordinate = Tiles.toYahoo(coordinate);21 coordinate = toYahoo(coordinate); 18 22 return "x="+(int)coordinate.column+"&y="+(int)coordinate.row+"&z="+ (int)coordinate.zoom; 19 23 } … … 49 53 } 50 54 55 public static Coordinate fromYahoo(Coordinate coord) { 56 // Return column, row, zoom for Yahoo x, y, z. 57 return new Coordinate((int)PApplet.pow(2, 18 - coord.zoom - 1), coord.column , 18 - coord.zoom); 58 } 59 60 public static Coordinate toYahoo(Coordinate coord) { 61 // Return x, y, z for Yahoo tile column, row, zoom. 62 return new Coordinate(coord.row, (int)PApplet.pow(2, coord.zoom - 1) - coord.row - 1, 18 - coord.zoom); 63 } 64 65 public static Coordinate fromYahooRoad(Coordinate coord) { 66 // Return column, row, zoom for Yahoo Road tile x, y, z. 67 return fromYahoo(coord); 68 } 69 70 public static Coordinate toYahooRoad(Coordinate coord) { 71 // Return x, y, z for Yahoo Road tile column, row, zoom. 72 return toYahoo(coord); 73 } 74 75 public static Coordinate fromYahooAerial(Coordinate coord) { 76 // Return column, row, zoom for Yahoo Aerial tile x, y, z. 77 return fromYahoo(coord); 78 } 79 80 public static Coordinate toYahooAerial(Coordinate coord) { 81 // Return x, y, z for Yahoo Aerial tile column, row, zoom. 82 return toYahoo(coord); 83 } 84 51 85 } 52 86 trunk/processing/src/com/modestmaps/StaticMap.java
r486 r498 1 1 package com.modestmaps; 2 2 3 import com.modestmaps.geo.*; 4 import com.modestmaps.core.*; 5 import com.modestmaps.providers.*; 3 6 import processing.core.*; 4 7 import java.util.Vector; 5 8 6 public class MMap {9 public class StaticMap { 7 10 8 11 public PApplet parent; … … 12 15 public Point2f offset; 13 16 14 public MMap(PApplet parent, AbstractMapProvider provider, Point2f dimensions, Location location, int zoom) {17 public StaticMap(PApplet parent, AbstractMapProvider provider, Point2f dimensions, Location location, int zoom) { 15 18 this.parent = parent; 16 19 MapCenter center = calculateMapCenter(provider, provider.locationCoordinate(location).zoomTo(zoom)); … … 21 24 } 22 25 23 public MMap(PApplet parent, AbstractMapProvider provider, Point2f dimensions, Coordinate coordinate, Point2f offset) {26 public StaticMap(PApplet parent, AbstractMapProvider provider, Point2f dimensions, Coordinate coordinate, Point2f offset) { 24 27 // Instance of a map intended for drawing to an image. 25 28 // provider … … 349 352 350 353 if (verbose) { 351 MMap.this.parent.print("Requesting ");352 MMap.this.parent.print(PApplet.join(urls, ", "));353 MMap.this.parent.println(" - attempt no. " + attempt);// + " in thread', thread.get_ident()354 StaticMap.this.parent.print("Requesting "); 355 StaticMap.this.parent.print(PApplet.join(urls, ", ")); 356 StaticMap.this.parent.println(" - attempt no. " + attempt);// + " in thread', thread.get_ident() 354 357 } 355 358 … … 364 367 } 365 368 if (type != null) { 366 imgs[i] = MMap.this.parent.loadImage(urls[i], type);369 imgs[i] = StaticMap.this.parent.loadImage(urls[i], type); 367 370 } 368 371 else { 369 imgs[i] = MMap.this.parent.loadImage(urls[i]);372 imgs[i] = StaticMap.this.parent.loadImage(urls[i]); 370 373 } 371 374 } … … 385 388 386 389 if (verbose) { 387 MMap.this.parent.print("Received ");388 MMap.this.parent.print(PApplet.join(urls,", "));389 MMap.this.parent.println(" - attempt no. " + attempt);// 'in thread', thread.get_ident()390 StaticMap.this.parent.print("Received "); 391 StaticMap.this.parent.print(PApplet.join(urls,", ")); 392 StaticMap.this.parent.println(" - attempt no. " + attempt);// 'in thread', thread.get_ident() 390 393 } 391 394
