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

Fix QGIS server alias #4194

Merged
merged 1 commit into from
Aug 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/datasource/Helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ const exports = class {
googAsserts.assertString(ogcLayerName, 'The data source should have only one ogcLayer.');
for (const element of featureType.element) {
if (element.name === ogcLayerName) {
googAsserts.assert(featureType.complexType[0].name === element.type);

const complexContent = featureType.complexType[0].complexContent;
const attributes = new ngeoFormatWFSAttribute().read(complexContent);

// Set the attributes in the data source
dataSource.setAttributes(attributes);

wfsDescribeFeatureTypeDefer.resolve(attributes);
break;
for (const type of featureType.complexType) {
if (type.name == element.type) {
const complexContent = type.complexContent;
const attributes = new ngeoFormatWFSAttribute().read(complexContent);

// Set the attributes in the data source
dataSource.setAttributes(attributes);

wfsDescribeFeatureTypeDefer.resolve(attributes);
break;
}
}
}
}
});
Expand Down