[mapserver-users] java mapplet tooltips -- question

Robert Chavez rchavez at perseus.tufts.edu
Fri Jun 1 10:05:32 EDT 2001


Greetings,

I'm trying to add some functionality to Steve's mapplet and I'm wondering if
anyone has some advice.

What I want to do is add a little java method and javascript so that when a
user mouses over a feature in a plotted layer, information about that
feature appears in a popup tooltip layer.  Kind of an alternate way of
displaying label information.

Some of the tooltip info will come directly from the Shapefile, other info
will come from a PostGres database.  I don't have a problem getting the
tooltip info out of the shapefiles and database and processing it.  Since
I'm using mapscript I can pull that information out of the appropriate place
and embed it in the output HTML in <div> tags that a JavaScript can pick up
and display..

The problem for me is how to get the applet and JavaScript communicating
properly.  I'm having some trouble figuring out how to get a mouseover on a
feature in the applet map to tip off the JavaScript to display the tooltip.

Any advice/suggestions would be greatly appreciated.
Thanks,
Rob




More information about the mapserver-users mailing list