Hi Francesca, I'm not sure what's causing the problem that you're having. JMapPane sets the transforms (world to screen and its inverse) when a map context with layers is first set or when one or more layers are added. Looking at the code I can't spot an obvious gap in the setting logic. Also, if the transforms are null any attempt to display features should cause a NullPointerException.
Are features displayed by the map pane ? Michael On 3 May 2011 01:14, Francesca Martelli <[email protected]> wrote: > Hi Michael, > > in the map context there are 7 layers, with the same crs (WGS84)... > > > Il giorno lun, 02/05/2011 alle 23.22 +1000, Michael Bedward ha scritto: >> Hello Francesca, >> >> Have you got any layers in the map context ? >> >> Michael >> >> >> On 2 May 2011 23:15, Francesca Martelli <[email protected]> >> wrote: >> > Hi guys, >> > I have another problem: I have a JMapFrame with a JMapPane which >> > contains a MapContext; when I call getScreenToWorldTransform() on the >> > mappane, it returns null. >> > >> > The following is the line code that I use: >> > AffineTransform tr = mapFrame.getMapPane().getScreenToWorldTransform(); >> > >> > Any ideas about? >> > francesca >> > >> > >> > -- >> > Francesca Martelli, Computer Science Ph.D. >> > Algorithms and Computational Mathematics Group, IIT - CNR, Pisa >> > Phone: +39 050 315 3191 (office), +39 050 315 2333 (fax) >> > http://www.iit.cnr.it/francesca.martelli/ >> > email: [email protected] >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > WhatsUp Gold - Download Free Network Management Software >> > The most intuitive, comprehensive, and cost-effective network >> > management toolset available today. Delivers lowest initial >> > acquisition cost and overall TCO of any competing solution. >> > http://p.sf.net/sfu/whatsupgold-sd >> > _______________________________________________ >> > Geotools-gt2-users mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> > > > > -- > Francesca Martelli, Computer Science Ph.D. > Algorithms and Computational Mathematics Group, IIT - CNR, Pisa > Phone: +39 050 315 3191 (office), +39 050 315 2333 (fax) > http://www.iit.cnr.it/francesca.martelli/ > email: [email protected] > > > ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
