Sie sind auf Seite 1von 1

Dear All,

Here is the script to get mapping inputs from the user (pg 52 of the book) :
Choose any data of choice to be displayed on a map ( world map, country map, state map .)
Get map image from web
Create tab separated data file
Use processing script to create locations file
Use map example with your data
Demo : Indian Cities population.
PImage mapImage;
Table nameTable;
int currentRow = -1;
PrintWriter writer;
void setup(){
size(800,800);
mapImage=loadImage("map2res1.jpg");
nameTable=new Table("topten.txt");
writer=createWriter("locations.tsv");
cursor(CROSS);//make easier to pinpoint a location
println("click the mouse to begin .");
}
void draw(){
image(mapImage,0,0);
}
void mousePressed(){
if(currentRow!=-1){
String abbrev=nameTable.getRowName(currentRow);
writer.println(abbrev+"\t"+mouseX+"\t"+mouseY);
}
currentRow++;
if(currentRow==nameTable.getRowCount()){
//CLOSE THE FILE AND FINISH.
writer.flush();
writer.close();
exit();
}else{
//Ask for the next coordinate.
String name=nameTable.getString(currentRow,0);
println("Choose location for "+name+".");
}
}

Driving truck >> Tata >> 3 -4 lakhs


Food quality ?
Next phase of aggregation !!
Fund raising ??
Monitoring the app development
Conceptualizing the business idea
Which platforms? features?

Das könnte Ihnen auch gefallen