[mapserver-users] Expressions

Fawcett, David David.Fawcett at state.mn.us
Wed Feb 4 11:56:38 EST 2009


Jay, 
 
This sounds like more of a GeoMoose problem than a MapServer problem.  I
would try that list as well.
 
David.

	-----Original Message-----
	From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jay
Kapalczynski
	Sent: Wednesday, February 04, 2009 10:39 AM
	To: 'mapserver-users at lists.osgeo.org';
'mapserver-users at lists.umn.edu'
	Subject: [mapserver-users] 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:

	 

	Strfdate is not defined

	 

	mapParams[i].SetAttribute('value',strfdate(new
Date(d.getTime()+offset),formats............

	 

	 

	 

	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_8bi
t.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/44a432a0/attachment-0001.html


More information about the mapserver-users mailing list