[OpenLayers-Users] WFS Layer / Vector Layer

bartvde at osgis.nl bartvde at osgis.nl
Wed Mar 10 06:52:03 EST 2010


Hi Andrew,

nope, only POST is supported. Why would you want GET? I had this
discussion with Tim Schaub in the past and I could not think of a good
reason why I wanted GET if POST also works for the WFS product. Maybe you
have a good reason though?

Best regards,
Bart

> Bart,
>
> Thanks for that your first suggestion seems to have resolved the problem
> and
> I can now see the requests in Fiddler :)
>
> Is there a way to force the WFS layer to use HTTP Get rather than Post for
> requests?
>
> Thanks
>
> Andrew
>
> On 10 March 2010 10:29, <bartvde at osgis.nl> wrote:
>
>> Hi,
>>
>> don't use the namespace prefix in the featuretype.
>>
>>    {
>>        url:  "/MyApp/Proxy.ashx",
>>        featureType: "boundary",
>>        featurePrefix: "mystore",
>>        version: "1.1.0"
>>    })
>>
>> If this does not work, try specifying the featureNS (so the
>> corresponding
>> URI) explicityl.
>>
>> Best regards,
>> Bart
>>
>> > All,
>> >
>> > I'm relatively new to OpenLayers and I have downloaded version 2.8
>> from
>> > the
>> > website (Revision 9492) and I am attempting to use it with GeoServer
>> > 2.0.1.
>> >
>> > I have successfully added an OpenLayers.Layer.WFS layer using the
>> > following:
>> >
>> > var wfsLayer = new OpenLayers.Layer.WFS( "WFS", "/MyApp/Proxy.ashx",
>> > { typeName: "mystore:boundary" },
>> > {projection: new OpenLayers.Projection("EPSG:27700"), maxExtent: new
>> > OpenLayers.Bounds(0, 0, 13000000, 13000000)}
>> > );
>> >
>> >
>> > However, I understand that OpenLayers.Layer.WFS is depreciated (from
>> the
>> > documentation) and that I should use a vector layer, as such I have
>> > written
>> > the following to add as a vector layer:
>> >
>> > var wfsLayer = new OpenLayers.Layer.Vector( "WFS", {
>> >   strategies: [new OpenLayers.Strategy.BBOX()],
>> >   projection: new OpenLayers.Projection("EPSG:27700"),
>> >   maxExtent: new OpenLayers.Bounds(0, 0, 13000000, 13000000),
>> >   protocol: new OpenLayers.Protocol.WFS(
>> >    {
>> >        url:  "/MyApp/Proxy.ashx",
>> >        featureType: "mystore:boundary",
>> >        version: "1.1.0"
>> >    })
>> > });
>> >
>> > My problem is that the first method works fine but the second method
>> > doesn't
>> > seem to do anything. I have tested using IE7 and Firefox and fiddler
>> > doesn't
>> > report any traffic or requests to the Proxy URL.
>> >
>> > Any ideas?
>> >
>> > Thanks
>> >
>> > Andrew
>>  > _______________________________________________
>> > Users mailing list
>> > Users at openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>>
>>
>>
>





More information about the Users mailing list