Re: vehicle tracking using omapplet.

From: PRADEEP RAMACHANDRAN <arpradeep@lycos.com>
Date: Thu Nov 22 2001 - 02:23:12 EST

Hello Anoop,

You could take a look at the discussions starting at :
http://openmap.bbn.com/mailArchives/openmap-users/0448.html

There are different ways you can have graphics on your layer, look up the DemoLayer ( com.bbn.openmap.layer.DemoLayer ). You could use OMGraphics, simple ones like OMCircle for instance.

The principles of Object Oriented Design apply, you can extend the Layer class and keep adding graphics ( OMGraphicList ) and then have them generated and rendered.

Your server could be any kind of data source, if its a servlet you could use the URLConnection object and you could block when there is no data to read. Http, I think is more suited for a request-response usage, you need to have some kind of Session Manager that keeps the session alive. You can specify teh session timeout interval in the web.xml file that comes with Tomcat ( if that is your web server ) or you could poll from the client at regular intervals, but this may be a load on the system. You could read the data and have a new graphics list created and rendered or you could update the earlier one, the logic depends on your design.

You can refresh ony the concerned layer by regenerating and rendering the graphics for that layer. While doing this you would need a reference to the projection instance. The DemoLayer is a good starting point for examples. There are other examples that come with the distribution and the mailing list has discussions on many things that you could find useful.

How OpenMap communicates with the rest of the application depends on the design, it could by using references to objects that make up the rest of your application or if your application uses Java Beans you can exploit the BeanContext.

Hope this helps.

Regards,
Pradeep.

--
On Thu, 22 Nov 2001 11:14:12  
 anoop wrote:
>hi all,
>
>i have finally got the omapplet up and running fine. Thanks for all
>ur help(s).
>I need a bit of guidance more about a vehicle tracking application 
>that i am abt to develop.
>my application is something like this...
>when a user wants to see his vehicles position on the map, he logs on to
>his browser and then he can look at the vehicles position as it gets updated from the
>GPS. what i need to know here is .. can this updation of the map be done
>using the applet...if let us say the map/applet is updated every 5 seconds,
>then will the whole page have to be refreshed...we must not forget that the data
>(LatLon positions of the vehicle) comes from the server. and the applet is run
>on the client side..so there shd be some delay for data retrieval. How good will
>be the response time.
>
>I intend to use a servlet/jsp to provide the data to the applet and then the applet
>refreshes the latest position of the vehicle.
>One more thing..is it necessary to have the vehicle's position (as a dot/star)
>on a different layer so that we can refresh only this layer..is this 
>possible. ANd also can somebody provide some hints abt how to make a layer
>which is empty initially and gets updated as and when necessary, and how to plot 
>points on to this layer...are there some default symbols available in openmap
>or wd i hv to use some gif or jpg image.
>
>One last thing...the applet resides in the openmap.jar archive..so if i want to make an
>additional application so that the applet can communicate with my program too,
>how shd i go abt that...shd i add my latest programs to the archive..or can i
>hv some sort of an external interface??
>
>Thanks in advance..
>waiting for replies..
>
>anoop
>
--
[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 Thu Nov 22 02:23:37 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT