Rapatsk1 wrote on May 23rd, 2010, 3:37am:have you downloaded the source code
http://benfry.com/writing/treemap/library.zip
Yes already tried a little bit, but i dont understand what to put where.
Have already finished a project mapping all my patients on a regional map including changes over time includin an extra program for data mining an prprocessing.
Thus i have some minimal basic knowledge
I tried to reuse the both treemap examples in the book:
class WertItem extends SimpleMapItem {
String kostenart;
String abteilung;
float wert;
WertItem(String kostenart,String abteilung,float wert) {
this.kostenart =kostenart;
this.abteilung = abteilung;
this.wert = wert;
}
void draw() {
fill (255);
rect(x,y,w,h);
fill(0);
if (w >textWidth(kostenart) +6) {
if (h >textAscent() +6) {
textAlign(CENTER,CENTER);
text(kostenart,x+w/2,y+h/2);
}
}
}
wert is the value to be calculated
As I understand the first example an array of values have to be created.
Dont know if this is right, and how to create the SimpleMapModel
Peter