Implements a WFS Store capable of WFS-T transactions
npm install ria-wfststore
npm install
npm run build
`
Then you can publish the package to npm or other repository
To test
Some test have been added that runs using nodejs using Jest. No browser test is available at the moment.
The test uses isomorphic-fetch to provide fetch in node testing with jest.
`
npm run test
`
Test use the sever-side implementations, use GeoServer of LuciadFusion
To install in your project
Simply import the NPM package into your project
`
npm install ria-wfststore
`
To use in your project
WFSTFeatureStore works as any other LuciadRIA Store that supports read/write. Therefore it is interchangeable with other stores.
You can use this store together with FeatureModel and Featurelayer.
$3
Normally you should start by interrogating the server to detect if WFS-T is supported, you can do this with WFSCapabilitiesExtended
`Typescript
WFSCapabilitiesExtended.fromURL(request, options).then(({wfsCapabilities, wfstCapabilities}: WFSCapabilitiesExtendedResult) => {
const wfstCapable = wfstCapabilities.WFSTCapable;
const wfstOperations = wfstCapabilities.WFSTOperations;
})
.catch((err) => {
handleHTTPErrors.handleError(err);
});
`
$3
* For this purpose use WFSTFeatureStore, then use it with 'FeatureModel' and Featurelayer and insert it to the map.
* You will need to wire to some Edit Controllers, you can refer to the LuciadRIA Create and Edit sample for that purpose.
`typescript
const store = new WFSTFeatureStore({...options, serviceURL: "yoururl"});
const model = new FeatureModel(store, {reference: store.getReference()});
const layer = new FeatureLayer(mdoel, {labe: "My WFST", editable: true});
`
$3
* For this purpose use WFSTFeatureLockStore
`typescript
const store = new WFSTFeatureLockStore({...options, serviceURL: "yoururl"});
const model = new FeatureModel(store, {reference: store.getReference()});
const layer = new FeatureLayer(mdoel, {labe: "My WFST", editable: true});
``