riadh troudi a écrit :
I dont understand the first step, ( how to iterate over my point coordinates
in the sub class of MarkIterator )
It depends how yours point are stored. MarkIterator is an abstract class - it doesn't make any
assumption about how yours points are stored. You can put them in a java.util.List if you wish.
Lets suppose that you decided to store yours points in an List<Point2D>. MarkIterator would
conceptually wraps the List's iterator:
class MyIterator extends MarkIterator {
private final List<Point2D> coordinates;
private int index = -1;
MyIterator(List<Point2D> coordinates) {
this.coordinates = coordinates;
}
public int getIteratorPosition() {
return index;
}
public void setIteratorPosition(int index) {
this.index = index;
}
public boolean next() {
return ++index < coordinates.size();
}
public Point2D position() {
return coordinates.get(index);
}
}
There is also some other methods you can override in order to control the
color, shape, etc.
Martin.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users