Re: web server, image maps

From: Don Dietrick <dietrick@bbn.com>
Date: Thu Jun 20 2002 - 22:39:40 EDT

Hi François,

On Thursday, June 20, 2002, at 07:57 PM, Francois Rouaix wrote:

> 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).

That's good to hear! An interesting project!

>
> 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)

I don't really know of any.

> 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.

Are you modifying the prefix before calling super.setProperties()? If
you call super.setProperties() with the original prefix you received in
your derived classes' method, it should be working. I haven't had
problems in other similar situations.

> 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.
>

Thanks for the update!

- Don

>> -----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"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Thu Jun 20 22:39:55 2002

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