-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmodest_maps_static.pde
More file actions
35 lines (29 loc) · 831 Bytes
/
modest_maps_static.pde
File metadata and controls
35 lines (29 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import com.modestmaps.*;
import com.modestmaps.core.*;
import com.modestmaps.geo.*;
import com.modestmaps.providers.*;
//
// This is a test of the static Modest Maps library for Processing.
//
// You must have modestmaps in your libraries folder, see INSTALL for details
//
// The tests are useful, and seem to pass.
//
// The Atkinson dithering is fun too, but slow.
//
void setup() {
size(1280, 720);
if (!runTests(false)) {
println("one or more tests failed");
exit();
}
noLoop();
}
void draw() {
StaticMap m = new StaticMap(this, new Microsoft.AerialProvider(), new Point2f(width/2, height), new Location(51.5, -0.137), 12);
PImage img = m.draw(true);
image(img,0,0);
img = atkinsonDither(img);
image(img,width/2,0);
println("done");
}