Hi Carlos,
On Tuesday, November 6, 2001, at 08:10 AM, Carlos Vasconcellos wrote:
> Dear all,
>
> ---The problem---
> I could not paint (update) OMGraphicList objects
>
> ---How i m working---
> I´ve created a layer that listens to a TCP/IP port. ie:
> socket = new Socket(address, PORTNUM);
> isr = new InputStreamReader(socket.getInputStream());
> in = new BufferedReader(isr);
> The layer implements Runnable capabilities to keep listening the port
> "forever" while the openmap does everything else.
> The run() method listens forever to a port and adds "x" to the graphics
> list. ie:
> graphics.addOMGraphic(createText(lat, lon, "X" , Color.yellow));
> There is a server that sends lat lon points and the layer listen to
> that port
> Every input streaming must be plotted.
>
> ---What s happening---
> The graphic objects are being plotted only when there is an update on
> screen (zoom, pan).
>
> --How to solve the problem---
> What should i do to plot the "x" without needing to refresh screen?
Make sure that the new graphic is being generated
(OMGraphic.generate(Projection)) with the current map projection, and
then call repaint() on the layer. You are probably adding the graphic
to a OMGraphicList without generating it and it won't draw without
generation. Then, with a projection change, the OMGraphicList contents
are getting generated with the new projection, and then it will draw.
- Don
>
> --The environment--
> I m using Win2k, JDK1.3.1, NetBeans IDE 3.2, OpenMap 3.6.2
>
> Thanks for the attention,
>
> Carlos Vasconcellos
> Curitiba/PR - Brazil
>
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Nov 6 10:45:00 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT