Re: [OpenMap Users] Init/Debug of layers in a servlet

From: Don Dietrick <dietrick@bbn.com>
Date: Thu May 06 2004 - 12:35:01 EDT

Hi Mike,

You probably don't want to create a new ImageServer (along with all the
layers) every time a get request comes in. I'd suggest creating one
with all the layers, and then using it to create the image when each
request arrives.

You shouldn't be having a problem doing what you want to do, creating
the ImageServer with the properties just sets the layers and
formatters. I'd add a couple of lines to your constructor for
testing:

        Debug.init();
        Debug.put("imageserver");
        Debug.put("datelayer");

Just to see a printout of the behavior of the ImageServer and the
DateLayer. It'll tell you a little bit of what it's doing, if you can
see stdout.

- Don

On May 5, 2004, at 8:26 PM, Mike Roberts wrote:

>
> Hi All -
>
> I created the attached servlet, which uses openmap and the default
> properties file. In the form attached, it works fine, and generates a
> nice
> default map with the default layers. Very pretty !
>
> However, I have a question about the initialization of layers. If I
> pass
> in an array of layers and a jpeg formatter to the ImageServer, rather
> than
> letting it make its own layer structure from the properties file I get
> nothing out (I'm using just the data layer as a starting point). Lines
> 125/126 show this behavior.
>
> I've looked at the layer I create and it looks fine, and has the same
> props as
> the date layer created in the SimpleHttpImageServer which I used a
> starting point. Could someone have a quick scan throught the code and
> let
> me know what I'm doing wrong - I'm sure I have not initialized
> something
> which needs attention when the ImageServer is constructed in the manner
> described.
>
> thanks for your time !
>
> Mike Roberts
>
> <MapServlet.java>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don 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 Thu May 6 12:35:22 2004

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