Thank you Jody, but I would like to draw directly on the screen, since
the point changes its coordinates frequently and if I create a feature
collection, each time I change the point, the entire map is repainted
causing a flickering effect. The application is a kind of GPS navigator:
there is a map (map context with a number of shapefile in UTM) and I
need to represent a moving vehicle.

I have already tried to use the glass pane, but this does not solve the
problem since it is not possible to clear the glass pane, so old
positions remain painted over that. The only way I found for cleaning
the glass pane is to set visibility to false and to true again, but this
provokes flickering!!!

So, I was looking for a different approach...
francesca


Il giorno gio, 28/04/2011 alle 23.15 +1000, Jody Garnett ha scritto:
> Perhaps you can define a feature collection (in memory) with your
> point; declare the correct coordinate reference system for your UTM
> zone (when you do this).
> 
> 
> And then add that FeatureCollection to the screen as a separate layer?
> 
> 
> There are a number of FeatureCollection implementations available for
> you to work with:
> -http://docs.geotools.org/latest/userguide/library/main/collection.html
> 
> 
> The indexed one is very fast to display (but not suitable for use if
> you are changing your point).
> 
> 
> Jody
> 
> On Thu, Apr 28, 2011 at 10:52 PM, Francesca Martelli
> <[email protected]> wrote:
>         Hi all,
>         I have a problem with translation from utm coordinates in
>         screen pixel
>         position. I have already seen the tutorials (world2screen,
>         data2world...), but examples reported there seem do not work
>         in my case.
>         
>         I have a mapContext with shapefiles in a jmappane, and I would
>         like to
>         paint a point (with position expressed in UTM coordinates)
>         over the map.
>         
>         Any help is greatly appreciated.
>         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

Reply via email to