[mapserver-users] Item Query
Brent Fraser
bfraser at geoanalytic.com
Tue Dec 8 14:22:45 PST 2009
Jay,
Most Mapserver users won't know about GeoMoose's Services you've shown
below.
You may be able to use mapserver's text substitution to do what you
describe below. Try setting the value to the required filter symbol:
<option value=">">Greater Than</option>
and in the mapfile:
Filter * WHERE Propertytype = '%PropertyType%' and PriceFactor
%PriceFactor% %uservalue%
Or you may have to resort to mapscript to form the FILTER properly.
Brent Fraser
> Wondering if this is possible?
>
> I have a Service set up to allow the user to input a few choices.
> I then am attempting to send those to a .map file to query a layer
>
> Can this be done...I am grabbing at straws here because I don't even know
> if this can be done?
>
>
> Service from an xml file:
>
> <service title="SearchByPID" selectable="false" default="false"
> locked="true" div="PIDsearch">
> <url>/cgi-bin/mapserv.exe</url>
> <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
> <input type="hidden" name="mode" value="nquery"/>
> <input type="hidden" name="layer" value="parcels"/>
>
> <input type="select" name="PropertyType" title="Property
> Type:">
> <option
> value="Commercial">Commercial</option>
> <option
> value="Residential">Residential</option>
> <option value="Single Family">Single
> Family</option>
> <option value="Townhome">Townhome</option>
> <option value="Twinhome/Zero
> Lot">Twinhome/Zero Lot</option>
> </input>
> <input type="select" name="PriceFactor" title="Price
> Factor:">
> <option value="Greater Than">Greater
> Than</option>
> <option value="Less Than">Less
> Than</option>
> <option value="Between">Between</option>
> <option value="Equal To">Equal To</option>
> <option value="Greater Than Equal
> To">Greater Than Equal To</option>
> <option value="Less Than Equal To">Less
> Than Equal To</option>
> </input>
> </service>
>
>
> .map file being called from above.... IS there a way to Use the filter to
> query the shapefile with the values from the two comboboxes above?
> Can I make a where clause in the Filter....
> Filter * WHERE Propertytype (above combobox) and PriceFactor (above
> combobox)
>
> LAYER # Parcels Polygon Layer
> NAME 'Parcels'
> DATA 'parcels/parcels.shp'
> STATUS DEFAULT
> TYPE POLYGON
> METADATA
> qstring_validation_pattern '.'
> END
> TEMPLATE 'parcels/identpar.html'
> FILTERITEM 'PID'
> FILTER /^%idPID%/
> END
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
More information about the MapServer-users
mailing list