[OpenLayers-Users] Pass parameters to mapfile
S.Reena
reena at indiamail.com
Sat Nov 8 08:04:53 EST 2008
Hi,
One issue remains still ..
"http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/customisation/map
file/customNR.map&userid=2"
is working ok with
DATA "the_geom from ( select * from customised_poly AS f where f.subcat_id
IN (select subcat_id from subcat_info where maincat_id =0) AND
user_id='%userid%' )AS foo1 USING UNIQUE gid"
but is I want to pass a dynamic value( a variable user_id) instead of a
number ( in this case 2) then its not happening .
I am still trying with wms[5].mergeNewParams({userid:user_id}) but its not
working yet
Thanks,
Reena.
Arnd Wippermann wrote:
>
> 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
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/Pass-parameters-to-mapfile-tp20377405p20395897.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list