Hi Oliver,
> i was wondering how one would write zoom to point in geotools?
>
Perhaps something like this...
// point to zoom to
DirectPosition pos = ...
// desired map display width (e.g. calculated from scale)
double displayAreaWidth = ...
double dw = displayAreaWidth / 2;
ReferencedEnvelope bounds = new ReferencedEnvelope(
pos.getX() - dw, pos.getX() + dw,
pos.getY() - dw, pos.getY() + dw,
pos.getCoordinateReferenceSystem() );
myMapPane.setDisplayArea( bounds );
Hope this helps,
Michael
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users