imagemap examples
Gustavo Henrique Sberze Ribas
gribas at CPQD.COM.BR
Mon Jun 4 06:18:24 PDT 2007
Hello,
> I just want to retreive an imagemap and use it with my map image on
document load.
The trickiest part is that you can't load an imagemap from an external
reference, ie, you can't do that:
<IMG width="800" height="600" border="0"
src="http://cpqd/cgi-bin/mapserv?SERVICE=WMS&REQUEST=GetMap...&WIDTH=800
&HEIGHT=600"
usemap="http://cpqd/cgi-bin/mapserv?SERVICE=WMS&REQUEST=GetMap...&WIDTH=
800&HEIGHT=600" >
see http://www.w3.org/People/mimasa/test/imagemap/results
So you have two options, use some kind of pre-processing to link them,
like a JSP, ASP, PHP page that fetches the imagemap and puts it on the
page together with your map or you can use DHTML and work with DOM do
dynamically add content (the <MAP> tag) to the page. Attached are two
files exemplifying these ideas.
If you point your browser to
http://www.cpqd.com.br/monitor/americana/listEstacTotal.jsp and click on
the (+) icon in the first table row you'll see an application which uses
DOM to retrieve the imageMaps.
HTH,
Gustavo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagemapTest.jsp
Type: application/octet-stream
Size: 1675 bytes
Desc: imagemapTest.jsp
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070604/af71ac5b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagemap.js
Type: application/octet-stream
Size: 3920 bytes
Desc: imagemap.js
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070604/af71ac5b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagemap.script
Type: application/octet-stream
Size: 3920 bytes
Desc: imagemap.script
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070604/af71ac5b/attachment-0002.obj>
More information about the MapServer-users
mailing list