Israel Rodrigo Faria a écrit :
Weird, after removing all the listeners when i add my own ones some of the old behaviours come back. (Any idea why?)
I'm not sure, but it may be caused by the ZoomPane.addMouseListener method, which override the AWT Component.addMouseListener method.
Actually the fact that the right-click menu, mouse draw zoom is so tightly added to ZoomPane make it less customizable. Well, i wanted just few methods instead of it so tightly inside ZoomPane.
I realize that it is a grief against ZoomPane. Would it be possible to fill a JIRA task against it please (or some other volunter for that)?
Behaviour i wanted was something like this StyledMapPane myMap = new StyledMapPane(); /* Define Map Context */ myMap.setMapContext(mapContext); myMap.pan(20,30); //Offsets to pan myMap.zoomIn(); //Zoom in using default factor of 2. myMap.zoomIn(new Point2D(15,20)); //Zoom in using default factor of 2 centered on Point2D myMap.zoomOut; //Zoom myMap.zoom(new Point2D(10,10), new Point2D(20,20)); //Zoom enough to make actual (10,10) the new top-left corner and (20,20) new bottom-right. myMap.revertLastOperation();
More food for the above-mentionned JIRA task...
As for panning would be great to have the map somewhat cached, I mean, when you pan over the map it doesnt get all over re-renderized, because that makes it so much slow..
This is actually the Renderer job (or it may be a job of some ZoomPane subclass too). Using J2D renderer, you can enable buffering using for example:
MapPane.getRenderer().setOffscreenBuffered(minZ, maxZ, ImageType.VOLATILE);
I know there's no current standard on how GUI stuff will go in geotools. On developers side, is there any plans? Even although I'm not a experienced open-source developer I think i could throw some time on this.
I would like to give a try to GO-1 specification, but this is a controversial issue. GO-1 is published on the OGC web site (OpenGIS® Geographic Objects Implementation Specification (GO) at http://www.opengeospatial.org/specs/?page=specs). In GeoAPI javadoc, this is the "org.opengis.go" package and subpackages:
http://geoapi.sourceforge.net/2.0/javadoc/index.html Martin. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
