JMapPane-zoomToLayer

3 messages Options
Embed this post
Permalink
iceDice

JMapPane-zoomToLayer

Reply Threaded More More options
Print post
Permalink
Hello,

I use JMapFrame and JMapPane (gt-swing-2.6-SNAPSHOT) for displaying map with GeoTools.
I tried to zoom to layer with:
getMapPane().setDisplayArea(getMapPane().getMapContext().getLayer(0).getBounds());

I got map displayed with zoom to that layer however layer is not centered but aligned to
the left.
How to get map zoomed to layer and centered.

Best regards.
mbedward

Re: JMapPane-zoomToLayer

Reply Threaded More More options
Print post
Permalink
Mmm... I've got some good news and some bad news (heard that before ?)

The good news is that I've been working on how JMapPane handles its
transform and display area calculations today and I just committed the
changes. This was mainly to fix the display of grid coverages which
are rendered differently to vector layers.

The bad news is that the new code doesn't do what you want :-(

Let me have a think about it.

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: JMapPane-zoomToLayer

Reply Threaded More More options
Print post
Permalink
JMapPane now centres the display on the requested map area (world coordinates).

Nenad: I've just committed the changes so if you're downloading the
jar manually make sure that it is newer than this post.

Let me know if it works !

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users