|
Revision 499, 0.7 kB
(checked in by tom, 6 months ago)
|
working Processing sketches and library-ready src folder
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
// |
|---|
| 3 |
// This is a standalone port of the Python version of Modest Maps, |
|---|
| 4 |
// based off the version from around 13th February 2008. |
|---|
| 5 |
// |
|---|
| 6 |
// It works, but I won't be fixing bugs. It's all been ported to |
|---|
| 7 |
// .java files and will shortly be released as a library. |
|---|
| 8 |
// |
|---|
| 9 |
// |
|---|
| 10 |
|
|---|
| 11 |
void setup() { |
|---|
| 12 |
size(600, 600); |
|---|
| 13 |
runTests(); |
|---|
| 14 |
noLoop(); |
|---|
| 15 |
} |
|---|
| 16 |
|
|---|
| 17 |
void draw() { |
|---|
| 18 |
|
|---|
| 19 |
Map m = new Map(new RoadProvider(), new Point(600, 600), new Coordinate(3165, 1313, 13), new Point(-144, -94)); |
|---|
| 20 |
|
|---|
| 21 |
// Map m = new Map(new RoadProvider(), new Point(600, 600), new Location(51.5, -0.137), 14); |
|---|
| 22 |
|
|---|
| 23 |
PImage img = m.draw(true); |
|---|
| 24 |
|
|---|
| 25 |
img.save("map.png"); |
|---|
| 26 |
|
|---|
| 27 |
println(img); |
|---|
| 28 |
|
|---|
| 29 |
image(img,0,0); |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
void runTests() { |
|---|
| 33 |
doTilesTest(); |
|---|
| 34 |
doMicrosoftTest(); |
|---|
| 35 |
doGeoTest(); |
|---|
| 36 |
doCoreTest(); |
|---|
| 37 |
doMapTest(); |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|