mapfile - REQUIRES

Zamil Murji Zamil.Murji at DIVESTCO.COM
Tue Aug 17 09:45:17 PDT 2004


Hello list,

I get the following error when I use REQUIRES as part of my layer. Everything works fine if I take out the REQUIRES.

getString(): Symbol definition error. Parsing error near ([wells] != 1):(line 32)

Here is the relevant parts of my .map file.
rasterlogs is the layer in question, I only want to query it if wells is turned off.


LAYER
   NAME "wells"
#   DEBUG on
   TYPE point
   STATUS off
   MAXSCALE 800000
   CONNECTIONTYPE postgis
   CONNECTION "user=idc dbname=idc host=idcmap port=5432"
#   DATA "the_geom from main_well2"
   DATA "the_geom from (select oid, to_date(main_well2.spud_date, 'YYYY-MM-DD') as pretty_spud_date, to_date(main_well2.rig_release_date, 'YYYY-MM-DD') as pretty_rig_release_date, prettyuwi(main_well2.uwi) as prettyuwi, well_status(plot_symbol) as well_status, * from main_well2) as new_table using unique oid"
   TEMPLATE "./idcdev_tooltip_wells.html"
   PROJECTION
    "init=epsg:4269"
   END
END

LAYER
   NAME "rasterlogs"
   TYPE point
   STATUS off
   MAXSCALE 800000
   REQUIRES ([wells] != 1)
   CONNECTIONTYPE postgis
   CONNECTION "user=idc dbname=idc host=idcmap port=5432"
   DATA "the_geom from (select oid, to_date(main_well2.spud_date, 'YYYY-MM-DD') as pretty_spud_date, to_date(main_well2.rig_release_date, 'YYYY-MM-DD') as pretty_rig_release_date, prettyuwi(main_well2.uwi) as prettyuwi, well_status(plot_symbol) as well_status, * from main_well2) as new_table using unique oid"
   FILTER "raster_log = 'Y'"
   TEMPLATE "./idcdev_tooltip_wells.html"
   PROJECTION
     "init=epsg:4269"
   END
END

Here is the URL i'm sending (I replaced the ip address with xxx):
http://xxx.xx.xxx.xx/cgi-bin/mapserv?mode=nquery&map=/mapfiles/idcdev_canada_tooltip-query.map&imgext=75211.88879+3662074.25847+87345.05967+3671730.41522&mapsize=867+690&imgbox=557+361+567+371&source=SHD477&layers=wells+rasterlogs

Thanks for your help...
Zamil



More information about the MapServer-users mailing list