MapServer / MapServer-import

3 stars 2 forks source link

shpxy generates flawed area-tag for imagemaps with polygon areas #1850

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: andreas.maul@bgr.de Date: 2006/08/03 - 16:38

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
tbonfort commented 12 years ago

Author: sdlime Date: 2006/08/03 - 17:12

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
tbonfort commented 12 years ago

Author: andreas.maul@bgr.de Date: 2006/08/04 - 09:11

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
tbonfort commented 12 years ago

Author: sdlime Date: 2006/08/04 - 17:13

I guess I should update my example then (I missed that in your message). ;-)

Closting the bug...

Steve
tbonfort commented 12 years ago

Author: sdlime Date: 2006/08/04 - 17:23

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

Steve