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

Attachment: imagemapTest.jsp
Description: imagemapTest.jsp

Attachment: imagemap.js
Description: imagemap.js

Attachment: imagemap.script
Description: imagemap.script

Reply via email to