[OpenLayers-Users] Adding Aditional parameters to WFS request?

Tue Topholm tt at sugee.dk
Mon Aug 12 15:37:07 PDT 2013


Did you try adding it to the url, like this:
http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms101/htdocs/ms101.map&service=wfs
&route=6


--

Med venlig hilsen / Kind regards

Tue Topholm
Sugee
Tlf: +45 32 13 32 32
W: http://www.sugee.dk


2013/8/12 Saka Royban <sakaroyban at yahoo.com>

> Hi all
> I'm using Mapserver + OpenLayers. Now i wanna have a dynamic layer using
> variable substitution feature available in Mapserver (Is there any other
> solution?). I'm using following code:
>                     layer3 = new OpenLayers.Layer.Vector("Neighborhoods
> passed", {
>                     strategies: [new OpenLayers.Strategy.Fixed()],
>                     protocol: new OpenLayers.Protocol.WFS({
>                         url:  "
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms101/htdocs/ms101.map&service=wfs
> ",
>                         featureType: "subway_stations2",
>                                                 //featureNS: "
> http://mapserver.gis.umn.edu/mapserver",
>                                                 //geometryName:
> "msGeometry",
>                                                 //featurePrefix: "ms",
>                                                 srsName: "EPSG:26918",
> // Projection to be returned data in it.
>                                                 //maxFeatures: "300",
>     // maxFeatures to be returned.
>                                                 version: "1.1.0",
>                                                 route: '6'
>                                             }),
>                          });
>
> 'route' parameter is defined in Data parameter of mapfile and i'm sure it
> works (I've tested this via GET request and it returns a correct GML). But
> in don't know how to say to openlayers to add this additional parameter to
> request. Adding "route: '6'" to the last line before ending parenthesis
> also doesn't work.
>
> Any idea? Is it possible at all?
> or any better way to meet the same goal?
>
> Regards
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130813/24c51a9c/attachment.html>


More information about the Users mailing list