« Return to Thread: GeoServer HTML ImageMap extension?

Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View in Thread

We just started to develop an HTMLImageMap MapProducer. Maybe we can
join our efforts if you are interested (we'd like to give back our
MapProducer to the community as soon as it's quite complete).
Till now I tried to figure out how to correctly render an HTML ImageMap,
with geometric an non geometric information: our main target is to use
imagemaps as lightweight overlays to raster maps to get tooltips on map
layers.

What I need as WMS output is something like this (just an example):

<map name="NamedPlaces">
    <area shape="poly" id="NamedPlaces.1107531895890"  coords="29,-114
265,-114 265,40 -35,40 -35,6 29,-114" title="Ashton" alt="Ashton" />
    <area shape="poly" id="NamedPlaces.1107531895891"  coords="-3,186
-3,143 83,143 83,186 -3,186" title="Goose Island" alt="Goose Island" />
</map>

I found out that:
 - I cannot use StreamingRenderer on a customized Graphics2D, because
using it I could only render geometries (Correct me if I am wrong).
 - The KML MapProducer is a good place to learn. Our MapProducer is
currently a mix of KML and SVG MapProducers.

Now some questions (to anyone willing to share ideas on the subject):
 - I chose "text/html" as the mimetype for the MapProducer. Do you think
it's correct? Is any other mimetype defined for HTML ImageMaps?
 - I use TextSymbolizer (Label) to render the title and alt attributes
(it's quite powerful, expecially using the geotools filter functions in
SLD). I'd like, in a near future, to render additional textual
attributes (href, onmouseover, etc.). What could be the clearest way to
identify where to render a TextSymbolizer output (to which attribute). I
thought to use different rules with special names identifying the
attribute (something like <Rule><Name>onmouseover</Name>....). Do you
think it's the right way to go?

Thanks,
Mauro Bartolomeoli

meinc wrote:

> Has anyone yet implemented a GeoServer service that is capable of producing
> HTML image maps?
> The only hint on the web I found is that mapbender seems to offer such a
> service, where GML is translated to an HTML Image Map. However, mabpender
> talks PHP, which I don't.
>
> If no such service has yet been implemented, what would be the best way to
> set it up?
> Is it reasoable to realize it as a MapProducer, i.e. add a custom
> GetMapProducerFactorySpi entry?
>
> Since I've absolutely no experience with geo coordinate transformations my
> main problem is
> how to translate the GML coordinates into the corresponding pixel. So my
> first idea was to
> look at the WMS image producers that somehow renders the pixels.
>
> What I found so far was the use of
>
> org.geotools.renderer.lite.LiteShape2 within
> org.geotools.renderer.lite.StreamingRenderer
> which provides in its constructor the magic transformation, i.e.
> decimator.decimateTransformGeneralize(this.geometry,this.mathTransform);
>
> Where may I found more information on how to transform the coordinates to
> pixels?
>
> ~Bob
>
>  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

 « Return to Thread: GeoServer HTML ImageMap extension?