Ticket #2362 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Layer.WFS missing OpenLayers.Util.upperCaseObject(params)

Reported by: pdziemiela Owned by: elemoine
Priority: major Milestone: 2.9 Release
Component: Layer.WFS Version: 2.8
Keywords: Cc:
State: Complete

Description

Hi folks,

I was messing about with geoserver 2.0 and WFS version 1.1.0 and noticed that OpenLayers does not respect the version parameter in the initialize function.

If I pass in parameter "version: '1.1.0'", I get back

?typename=topp%3Arad_305b_l_pg &version=1.1.0 &SERVICE=WFS &VERSION=1.0.0 &REQUEST=GetFeature &SRS=EPSG%3A4326 &BBOX=-87.97359617915488,42.52413820958627,-87.72640379638788,42.6757695301923

In comparing things to the WMS, it looks like we are missing:

//uppercase params params = OpenLayers.Util.upperCaseObject(params);

at the top of initialize around line 122 in /Layer/WFS.js

Patch is attached.

Cheers,

Paul

Attachments

Layer_WFS_20091127.patch Download (0.6 KB) - added by pdziemiela 3 years ago.
patch

Change History

Changed 3 years ago by pdziemiela

patch

  Changed 3 years ago by pdziemiela

  • summary changed from Layer.WFS missing to Layer.WFS missing OpenLayers.Util.upperCaseObject(params)

follow-ups: ↓ 3 ↓ 5   Changed 3 years ago by bartvde

Hi, not sure if Layer.WFS will still be maintained, you should be using an OpenLayers.Layer.Vector with a Protocol.WFS and a Strategy (BBOX e.g.) instead. Check examples\wfs-protocol.html.

in reply to: ↑ 2   Changed 3 years ago by elemoine

Replying to bartvde:

Hi, not sure if Layer.WFS will still be maintained, you should be using an OpenLayers.Layer.Vector with a Protocol.WFS and a Strategy (BBOX e.g.) instead. Check examples\wfs-protocol.html.

yet, applying this patch would make sense to me, as it's trivial and harmless. What do you think?

  Changed 3 years ago by bartvde

  • state changed from Review to Commit

Hi Eric, true, feel free to commit this one. I did not check if it breaks any tests though where params are maybe lowercase.

in reply to: ↑ 2 ; follow-up: ↓ 8   Changed 3 years ago by pdziemiela

Hi Bart,

Your comments make sense however I am not sure where I would have picked up the idea that Layer.WFS is deprecated. When searching the dev examples for "WFS", I get 10 results. Four of the results use Layer.Vector but six of the results use Layer.WFS. As I was just trying to slap something together quick I guess I gravitated to the Layer.WFS interface as being simpler. Is there a need to add some comments to the Layer.WFS code to direct people towards using Layer.Vector? Secondly, should there be a task to rewrite those six examples to bypass the Layer.WFS interface?

Cheers, Paul

  Changed 3 years ago by bartvde

Thanks for the feedback Paul, we need to do something about this in the examples and the code for sure.

  Changed 3 years ago by bartvde

Deprecated comments added to the source code in r9849

in reply to: ↑ 5   Changed 3 years ago by tschaub

Replying to pdziemiela:

Hi Bart, Your comments make sense however I am not sure where I would have picked up the idea that Layer.WFS is deprecated. When searching the dev examples for "WFS", I get 10 results. Four of the results use Layer.Vector but six of the results use Layer.WFS. As I was just trying to slap something together quick I guess I gravitated to the Layer.WFS interface as being simpler. Is there a need to add some comments to the Layer.WFS code to direct people towards using Layer.Vector? Secondly, should there be a task to rewrite those six examples to bypass the Layer.WFS interface? Cheers, Paul

See r9861, r9862, r9863, r9864, and r9865.

When the examples are re-parsed, this will be more relevant: http://openlayers.org/dev/examples/?q=wfs

  Changed 3 years ago by tschaub

  • owner set to elemoine

  Changed 3 years ago by bartvde

  • milestone changed from 2.10 Release to 2.9 Release

  Changed 3 years ago by bartvde

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10109]) Layer.WFS missing OpenLayers.Util.upperCaseObject(params), p=pdziemiela, r=elemoine,me (closes #2362)

  Changed 3 years ago by bartvde

pdziemiela, do we have a CLA from you? See:  http://trac.openlayers.org/wiki/HowToContribute TIA.

Note: See TracTickets for help on using tickets.