[mapserver-users] Expressions
Jay Kapalczynski
jkapalczynski at ci.maple-grove.mn.us
Fri Sep 17 06:20:18 PDT 2010
I am using GeoMoose but feel this is more a question for Map Server.
I am trying to sort my points by dates using the code below....I think that I can do this but not sure
Is this a viable format "2Y%2M%2D" ?
* As for the field in the shapefile...If I use an integer it removes the 0 from the 092110, (sept 21st 2010)
* If I use a date then there are "/" ... 9/21/10
* The only way I can see this happening is using a text field with retains the 0 in 092110
When I use the textfield "dateValues" as seen below I can get the stars to draw but only the LASTWEEK...for some reason the LASTTWOWEEKS does not show and I know that I have a few records with dates in the last 14 days...
Thoughts?
THANKS....all your help is very appreciated....
Main .xml file
<map-source name="Burglaries" type="mapserver">
<file>./maple_grove_datasets/police/Burglaries.map</file>
<param type="today" offset="-7" name="LASTWEEK" format="%2Y%2M%2D" />
<param type="today" offset="-14" name="LASTTWOWEEKS" format="%2Y%2M%2D" />
<param type="today" offset="-30" name="LASTTHIRTY" format="%2Y%2M%2D" />
<param type="today" offset="-90" name="LASTNINTY" format="%2Y%2M%2D" />
<layer name="Burglaries"/>
</map-source>
.map file
CLASS
NAME 'Last Weeks'
EXPRESSION ('[dateValues]' > '%LASTWEEK%')
STYLE
COLOR 0 0 0
SYMBOL "star"
SIZE 12
END
END
CLASS
NAME 'Last Two Weeks'
EXPRESSION ('[dateValues]' > '%LASTTWOWEEKS%')
STYLE
COLOR 0 100 50
SYMBOL "star"
SIZE 12
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100917/5c609b5d/attachment.htm>
More information about the MapServer-users
mailing list