Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1850 closed defect (invalid)

shpxy generates flawed area-tag for imagemaps with polygon areas

Reported by: andreas.maul@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.8
Severity: normal Keywords:
Cc:

Description

in the howto document "http://mapserver.gis.umn.edu/docs/howto/imagemaps" is 
stated that for generating an imagemap with polygon areas such a query template 
should be used:
<area shape="polygon" coords="[shpxy precision=0 proj=image]"  ...>
The correct syntax for polygon areas is: shape="poly" .
Inspection of the shpxy-example (6. More Information): 
http://maps.dnr.state.mn.us/cgi-bin/mapserv48?
map=/usr/local/www/docs_maps/eco/rsg/search/search_example.map&qlayer=county&mod
e=nquery&searchmap=true
shows the following source code:
...
 <area shape="polygon" coords="96,42 104,43 105,15 ...>
...
i.e. missing commas between the coordinates. The correct syntax is 
x1,y1,x2,y2,...,xn,yn
IE works with the spaces between the coordinates, Firefox does not.
Don't know whether shape="rect" is also usable? Similar syntax there: 
<area shape="rect" coords="x1,y1,x2,y2" ...> 
Regards,
Andreas

Change History (4)

comment:1 by sdlime, 18 years ago

Status: newassigned
I've been unable to determine what format is actually correct. You see both 
documented out there. You can easily override the behavior by setting cs="," in 
the shpxy tag.

I see that firefox will complain but not fail. Other browsers seem to deal with 
it just fine.

Steve

comment:2 by andreas.maul@…, 18 years ago

ok, I've tested the source code of the example with the W3C-validator 
(http://validator.w3.org) and after changing the tag <area shape="polygon" ...> 
to <area shape="poly" ...> there were no complains about the spaces between the 
coordinates.
Andreas

comment:3 by sdlime, 18 years ago

Resolution: invalid
Status: assignedclosed
I guess I should update my example then (I missed that in your message). ;-)

Closting the bug...

Steve

comment:4 by sdlime, 18 years ago

I did update the site documentation and my example. Thanks for catching...

Steve
Note: See TracTickets for help on using tickets.