Ticket #2957 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

WFS protocol's read method should respect readOptions and pass them to the format

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.11 Release
Component: general Version: SVN
Keywords: Cc:
State: Complete

Description

While it is possible to configure the WFS protocol with readOptions, these will only be passed to the format if they have an output property. This ticket proposes that readOptions can also be passed to the protocol's read method, and that they will always be passed to the format.

With this change, applications will be able to use a configured WFS protocol to e.g. determine the hit count:

protocol.read({
    readOptions: {output: "object"},
    resultType: "hits",
    maxFeatures: null,
    callback: function(resp) {
        // process resp.numberOfFeatures here
    }
});

Attachments

openlayers-2957.patch Download (3.8 KB) - added by ahocevar 3 years ago.

Change History

Changed 3 years ago by ahocevar

Changed 3 years ago by ahocevar

  • state set to Review
  • version changed from 2.10 to SVN

Tests pass in Safari 5. Thanks for any review.

Changed 3 years ago by bartvde

  • state changed from Review to Commit

Andreas, this looks good to go. Only comment I have is can we also get rid of the two other occurences of:

obj.options = {};

in the tests/Protocol/WFS.html?

Changed 3 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed
Note: See TracTickets for help on using tickets.