[OpenLayers-Users] Pass parameters to mapfile
Arnd Wippermann
arnd.wippermann at web.de
Fri Nov 7 06:35:59 EST 2008
You can try to add the param to the url
"http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/customisation/map
file/customNR.map&userid=anID"
and in the mapfile try user_id='%userid%'. In special cases it is possible
per cgi-parameter manipulate the mapfile. I don't no if this case is one of
them.
Try the mapserver-list, because it is not an OpenLayers issue.
To retrieve more than one layer with OpenLayers WMS you use
{'layers' : 'NR_point,NR_polygon', 'transparent' : true, ... }, ...
a comma-separatet list as christopher mentioned.
Arnd Wippermann
-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von S.Reena
Gesendet: Freitag, 7. November 2008 10:39
An: users at openlayers.org
Betreff: [OpenLayers-Users] Pass parameters to mapfile
I am using the following data in my mapfile
DATA "the_geom from ( select * from customised_point AS f where
user_id='userid' AND f.subcat_id IN (select subcat_id from subcat_info where
maincat_id =0))AS foo USING UNIQUE gid"
I want the userid ( used in the above query) to be passed to map file at the
time of layer creation something like this....
wms[5] = new OpenLayers.Layer.WMS.Untiled(
"Customization","http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/c
ustomisation/mapfile/customNR.map"
+ userid ,{'layers': "NR_point",'transparent':"true"},{'layers':
"NR_polygon",'transparent':"true"},{'isBaseLayer':false} );
How to do that?
Thanks in advance :)
Cheers,
Reena.
--
View this message in context:
http://www.nabble.com/Pass-parameters-to-mapfile-tp20377405p20377405.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list