Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract WFS Store parameter creation to its own function #700

Merged
merged 4 commits into from
Aug 9, 2021

Conversation

geographika
Copy link
Member

This pull request moves the WFS request parameter creation out of the loadWfsInternal function in GeoExt.data.store.WfsFeatures and into its own function.
This allows the store logic to be used to download the contents of the store in another outputFormat for example:

        var url = store.url;
        var params = store.createParameters();
        params.outputFormat = 'shapezip'; // change the outputFormat for the current store contents

        // now we can request the same data in the store with a different format (if supported by the WFS server)

        // files can't be downloaded using Ext.Ajax.request (due to browser security)
        // so a hidden form is used with standardSubmit set to true
        // this approach does not allow callbacks to be run on success / failure

        Ext.create('Ext.form.Panel', {
            standardSubmit: true
        }).submit({
            params: params,
            url: url
        });

@coveralls
Copy link

coveralls commented Aug 6, 2021

Pull Request Test Coverage Report for Build 1105381201

  • 8 of 10 (80.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 81.175%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/data/store/WfsFeatures.js 8 10 80.0%
Totals Coverage Status
Change from base Build 961162952: 0.1%
Covered Lines: 1387
Relevant Lines: 1635

💛 - Coveralls

@geographika geographika merged commit 8d50bdb into geoext:master Aug 9, 2021
@geographika
Copy link
Member Author

Thanks for the reviews - merging now.

@chrismayer
Copy link
Contributor

Happy 💯 💯 💯 💯 💯 💯 💯 by the way 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants