[mapserver-users] FW: Expressions
Jay Kapalczynski
jkapalczynski at ci.maple-grove.mn.us
Tue Feb 3 14:09:20 PST 2009
I am trying to do expressions based on a shapefile...I had this working in a prior version but now it wont work...
The fields GEO_SIMPLE and dateValues exist in the shapefile.
I have the date values in "dateValues" as TEXT, 8 characters.
The Star symbols come up but the application freezes up and wont draw the rest of the layers...so I have something wrong...
Does the date format have to be changed?
Does the field have to be a date field?
Will the below format work? ("%2M%2D%2Y)
But in the field it looks like this 11509
If I remove the param types and the expression stuff it draws the layer fine...so it has to be with the dates.
THANKS IN ADVANCE FOR ANY HELP
I get this error:
[cid:image001.png at 01C98611.1084BB70]
DEMO.XML
<map title="Burglaries" default="true" reference="false" popups="true" data="true">
<param type="today" offset="-7" name="LASTWEEK" format="%2M%2D%2Y"/>
<param type="today" offset="-14" name="LASTTWOWEEKS" format="%2M%2D%2Y"/>
<param type="today" offset="-30" name="LASTTHIRTY" format="%2M%2D%2Y"/>
<param type="today" offset="-90" name="LASTNINTY" format="%2M%2D%2Y"/>
<file>/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/Burglaries/Burglaries_8bit.map</file>
</map>
BURGLARIES.map
CLASS
NAME 'Last Week'
EXPRESSION ('[GEO_SIMPLE]' = 'BURGLARY' AND '[dateValues]' > '%LASTWEEK%')
COLOR 197 0 255
SYMBOL "star"
SIZE 12
END
CLASS
NAME 'Last Two Weeks'
EXPRESSION ('[GEO_SIMPLE]' = 'BURGLARY' AND '[dateValues]' > '%LASTTWOWEEKS%')
COLOR 255 0 0
SYMBOL "star"
SIZE 12
END
CLASS
NAME 'Last Thirty Days'
EXPRESSION ('[GEO_SIMPLE]' = 'BURGLARY' AND '[dateValues]' > '%LASTTHIRTY%')
COLOR 0 255 0
SYMBOL "star"
SIZE 12
END
CLASS
NAME 'Last Ninety Days'
EXPRESSION ('[GEO_SIMPLE]' = 'BURGLARY' AND '[dateValues]' > '%LASTNINTY%')
COLOR 0 0 255
SYMBOL "star"
SIZE 12
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090203/2751f8d4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 17636 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090203/2751f8d4/attachment.png>
More information about the MapServer-users
mailing list