mapscript polygon hightlighting feature
Gustavo Henrique Sberze Ribas
gribas at CPQD.COM.BR
Mon Aug 29 08:03:12 PDT 2005
> Hello,
>
> I am wanting to write a function so that when a user
> clicks on a polygon, that polygon has its outer border
> changed to a different color with perhaps a greater
> line thickness. Ideally a refresh wouldn't be required
> for this. My question is twofold, a) whether this is
> possible b) if anyone has suggestions/code to get me
> started on this. Thanks in advance.
Hi,
a) Yes.
b1) You can pass an SLD to mapserv to highlight the desired
Polygon. That will require another request to the server
though.
http://mapserver.gis.umn.edu/doc/sld-howto.html
b2) You can use SVG.
http://maps.dnr.state.mn.us/cgi-bin/mapserv40?map=/usr/local/www/docs/testing/svg/test.map&mode=itemnquery&qitem=cty_name&qstring=/./&qlayer=county
http://lists.gis.umn.edu/pipermail/mapserver-users/2003-December/008640.html
http://mapserver.gis.umn.edu/doc/svg-howto.html
b3) You can do it with ImageMaps, JavaScript and DOM. Use
the ImageMap generated by Mapserver as a guide to draw
the Polygon's border with JavaScript... sounds crazy
but might work, and it wouldn't require a refresh or
additional plugins :)
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?ImageMap
HTH,
Gustavo
More information about the MapServer-users
mailing list