RE: web server, image maps

From: Francois Rouaix <francois@rouaix.org>
Date: Thu Jun 20 2002 - 19:57:30 EDT

Don,
Thanks a lot for the information. I now have working client-side
image maps on my maps (modulo some idiotic frontend problems
with usemaps and such).

More questions:
 - does anybody have a (free, royalty-free) library of icons (gif
or else) to be used as markers (e.g. the typical legend signs)

Some problems:
 - the prefix mangling code in DBLocationHandler setProperties()
doesn't seem to survive inheritance; I had to remove it in order
to have super.setProperties work in my derived class.

Details:
For the curious, I ended up doing the following (a rephrasing of
what Don suggested, mostly)
- subclassing MapRequestHandler to add a behavior for a new request
of type IMAGEMAP; also to add the imagemap data generation in the
case of a MAP (after the map has been generated, walk the layer's
graphics list to store image map information in a global hashtable
with a key that came with the request)
- subclassing DBLocationHandler to make the search for location dynamic
(e.g. do not preload the locations in a quadtree), and create my own
location objects which have imagemap information in them
(subclass of URLRasterLocation)

As for timing problem : I ended up creating the image and storing it in
a session-based file, instead having it served directly from the OpenMap
image server (only way I could find to make sure the map is created
first). I realize all this is a bit nebulous, but you'll see what I mean
if you try
to do something similar.

--f
François Rouaix

> -----Original Message-----
> From: owner-openmap-users@bbn.com
> [mailto:owner-openmap-users@bbn.com] On Behalf Of Don Dietrick
> Sent: Friday, June 14, 2002 9:01 AM
> To: Francois Rouaix
> Cc: openmap-users@bbn.com
> Subject: Re: web server, image maps
>
>
> 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
>

--
[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 Jun 20 20:00:10 2002

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