Hi,
I didn't get it fixed - and due to time constraints, I've had to do some different things in the CGI wrapper I'm using to get it to do what I want it to do...I might take a dip into the source at some point and see what's what. -- Charlie From: Lime, Steve D (MNIT) [mailto:[email protected]] Sent: 16 December 2013 21:00 To: Charlie Allgrove; [email protected] Subject: RE: [mapserver-users] Mapserver Expressions Did you get this fixed? The layer looks right to me. --Steve From: [email protected] [mailto:[email protected]] On Behalf Of Charlie Allgrove Sent: Wednesday, December 11, 2013 11:11 AM To: [email protected] Subject: [mapserver-users] Mapserver Expressions Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
