Re: web server, image maps

From: Don Dietrick <dietrick@bbn.com>
Date: Fri Jun 14 2002 - 12:01:04 EDT

Hi François,

This isn't supported with the current OpenMap code, but I think it would
be relatively easy to modify the code to do what you want.

The problem is that the Layers really don't have a way to communicate
with the ImageServer, or the thing that is generating the html response
to the client. What you would have to do is to write the html
generation Object you are using has a handle onto the LocationLayer that
you want to use. With that handle, you can get a Vector that contains
all the OMGraphics used by the layer, and you can use information from
the OMGraphics to create the image map.

Now, the other thing you'd have to do is extend the LocationHandler you
want to use to create OMGraphics that provide information that can be
used in the image map. The OMGraphic has a generic Object holder
(setAppObject, getAppObject) and you might want to create a customized
object to use as that Object that has the URL String along with the
placement of the link in the image map. Those coordinates would have to
be the projected x/y coordinates of the Location - just use the
projection object in the layer to forward project the lat/lon to get x/y.

There might a timing issue to work out - when do you create the image
map description versus when the image gets created, since the creation
of the image is when the OMGraphics that were used actually have the
information you want to embed in the image map. Other than that, it
whole thing should be pretty straight-forward.

Hope this helps,

Don

On Thursday, June 13, 2002, at 06:58 PM, Francois Rouaix wrote:

> Hello all,
> I'm a recent user of OpenMap. I've been able to set up in a couple
> of days a simple Web-based map server using a frontend on top
> of the SimpleHttpImageServer class (using the MAP, PAN and
> RECENTER features) with VMap0 data from USGS.
> This was pretty easy so far (my compliments to the OpenMap
> team for such a nice software).
> My next logical step is to add image maps on the HTML side,
> to provide links to specific objects displayed on the map
> (e.g. from a location layer, not from the VPF layer).
> How would you qualify this step ?
> - not compatible with current design of OpenMap
> - hard (requires new layer, new formatter ?)
> - medium (supported by the link layer ?)
> - easy (already supported, I just didn't look in the
> right place)
> I'd be grateful for indication on how to proceed (I'm
> ready to get my hands dirty and write some Java code).
>
> Thanks for your comments.
> --f
> François Rouaix
> (310) 316 9529
>
>
>
> --
> [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"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Fri Jun 14 12:03:37 2002

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