Re: getDocumentBase() in DemoLayer

From: Mike White <mrw@mitre.org>
Date: Thu Dec 20 2001 - 11:17:17 EST

The following should work:

1. In MyApplet.java (whatever your applet is called) make sure you are
initializing the Environment...

import com.bbn.openmap.Environment;
...
public MyApplet extends JApplet
{
   public MyApplet()
   {
      Environment.init( this );
      ...
   }
}

2. Then, when you need to get the applet from a layer...

public MyLayer extends Layer
{
   ...
   public void MyLayerMethod()
   {
      Applet applet = Environment.getApplet();
      applet.getDocumentBase();
      ...
   }
}

Mike White
mrw@mitre.org

> anoop wrote:
>
> Hi all,
>
> i hv manged to set up a vehicle tracking system which takes the
> co-ordinate data from a text file.
> Now i have decided to follow that each vehicle will have its own text
> file and will be called based
> on the servlet request preceding this applet. For this purpose i have
> modified the DemoLayer
> class, and now i need to get the documentBase of this applet. But i
> dont seem to get the way
> i am supposed to proceed in this. i tried using getDocumentbase() in
> DemoLayer, but i get
> errors that this is not a valid method..
> Can somebody help me with this.
> In short i need to access the url with which this applet is called in
> the DemoLayer class.
> And then i will modify the url to load my url file to feed th elatlong
> points..
>
> thanx in adv
> anoop
>
> P.S. Don, thanks to ur help, i finally managed to get my own maps to
> be displayed .. as u said this
> was a bounds problem which in some cases were 7 digit long figures..
> But is this a limitation or is it
> a problem with the data that i had..becoz most of the maps i hv, have
> the same huge bounds..
> basicallu these are tab files which i convert into shape files.
>
> rgds,
> 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 Dec 20 11:22:23 2001

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