[mapserver-users] RE: Expressions
Jay Kapalczynski
jkapalczynski at ci.maple-grove.mn.us
Wed Feb 4 08:34:40 PST 2009
Has something changes in the newer version of map server?
Has anyone done this before? Or ran into this problem?
Thanks
From: Jay Kapalczynski
Sent: Tuesday, February 03, 2009 4:09 PM
To: mapserver-users at lists.osgeo.org
Subject: FW: Expressions
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 01C986B4.2E6B0290]
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/20090204/6ea370bc/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/20090204/6ea370bc/attachment.png>
More information about the MapServer-users
mailing list