highlighting a feature in mode=map

John Cole john.cole at UAI.COM
Tue Apr 10 15:53:23 EDT 2007


David,
  This works quite well, but I'm wondering if this kind of query opens a sql
layer up to a sql injection attack?  Are MapServer's expressions scrubbed
for this possibility?

Thanks,

John


John, 

I have done this when I want to highlight a particular county in the
state.  To do this, I need to know the ID (FIPS) for the poly.  I create
a URL variable that is passed to mapserv in the url and then use that
variable in an expression in a class in the counties layer.  If you can
successfully use GID in an expression in your map file, you can do it
this way.

Here is an example LAYER:

LAYER
    NAME basemap
    STATUS DEFAULT
    TYPE POLYGON
    DATA 'county'
    CLASSITEM "COUNTY_FIP"
	CLASS 
       NAME "Low"
       EXPRESSION ('[COUNTY_FIP]' in '%group1%')
       OUTLINECOLOR 0 0 0   
       COLOR 255 204 204
    END
END
-- 
View this message in context: http://www.nabble.com/highlighting-a-feature-in-mode%3Dmap-tf3553524.html#a9926997
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list