How can I highlight more than one feature in QUERY mode?

Fischer, Brian bfischer at HOUSTONENGINEERINGINC.COM
Mon May 23 13:24:53 EDT 2005


I don't know how your application is setup, but another option is to
create a dummy layer in your map file to use for highlighting a feature.

 

LAYER # Dummy Parcels Polygon Layer to Highlight it yellow

    NAME parcel_poly

    DATA Parcels

    MAXSCALE 200000

    STATUS DEFAULT

    TYPE LINE

    CLASSITEM 'PIN'

    CLASS

            NAME "Parcel Selected"

            EXPRESSION '%PIN%'

      COLOR 255 255 0

      SYMBOL 'circle'

      SIZE 4

    END

  END # Dummy Parcels Polygon Layer to Highlight it yellow

 

Then use some javascript in your web page to create an expression and
pass the variable to the CGI (example
"/cgi-bin/mapserv.exe?mode=map&PIN=pin=17000003443001%20or%20pin=1700000
345494") and it will substitute the PIN variable name in the mapfile
with the value you passed in with the call to the CGI.  The expression
can contain "and" and "or" in it.

 

This is explained a bit in
http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#variablesubsti
tution documentation.

 

Brian Fischer

Houston Engineering, Inc.

Maple Grove, MN

(763) 493-4522

________________________________

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Fawcett, David
Sent: Monday, May 23, 2005 12:04 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] How can I highlight more than one
feature in QUERY mode?

 

Should that be ITEMNQUERYMAP?

 

David Fawcett 
Minnesota Office of Environmental Assistance 
david.fawcett at moea.state.mn.us 
651.215.0200 

        -----Original Message-----
        From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Daniele Margotti
        Sent: Saturday, May 21, 2005 3:51 AM
        To: MAPSERVER-USERS at LISTS.UMN.EDU
        Subject: [UMN_MAPSERVER-USERS] How can I highlight more than one
feature in QUERY mode?

        Hi list,

        with CGI mode=ITEMQUERYMAP I can produce a map with one
highlighted feature (defined using QITEM, QLAYER and QSTRING).

         

        How can I highlight more than one feature (within the same
layer) using the same syntax (QITEM + QLAYER + QSTRING)?

        Is there the possibility to use an "OR condition" or a regular
expression in QSTRING parameter?

         

        Thank you,

            Daniele

         

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050523/0ea14d28/attachment.html


More information about the mapserver-users mailing list