imagemap examples

Gustavo Henrique Sberze Ribas gribas at CPQD.COM.BR
Mon Jun 4 09:33:01 EDT 2007


  I'm resending the message with the examples inside a zip archive
because I received all sorts of warnings from several emails servers
complaining about the javascript example. 

  Sorry about that, hope it works this time.
--

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: examples.zip
Type: application/x-zip-compressed
Size: 2441 bytes
Desc: examples.zip
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070604/bee417c0/examples.bin


More information about the mapserver-users mailing list