|
@@ -145,7 +145,7 @@ function p5WFS_GetFeature(typeName, query) { // @returns Promise
|
|
|
} else if ('<wfs:Query>' === query['ogc:Filter'].substr(0, '<wfs:Query>'.length)) {
|
|
} else if ('<wfs:Query>' === query['ogc:Filter'].substr(0, '<wfs:Query>'.length)) {
|
|
|
postData = headerOgcFilter + query['ogc:Filter'] + '</GetFeature>'
|
|
postData = headerOgcFilter + query['ogc:Filter'] + '</GetFeature>'
|
|
|
} else {
|
|
} else {
|
|
|
- return Promise.reject(new Error('Error - wrong syntax ogc:Filter'))
|
|
|
|
|
|
|
+ return Promise.reject(new Error('Wrong syntax ogc:Filter'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ('graphql:query' in query && 'string' === typeof query['graphql:query']) { // TODO: http://graphql.org/learn/queries/
|
|
if ('graphql:query' in query && 'string' === typeof query['graphql:query']) { // TODO: http://graphql.org/learn/queries/
|
|
@@ -156,6 +156,7 @@ function p5WFS_GetFeature(typeName, query) { // @returns Promise
|
|
|
if ('maxFeatures' in query) link += '&maxFeatures=' + query['maxFeatures']
|
|
if ('maxFeatures' in query) link += '&maxFeatures=' + query['maxFeatures']
|
|
|
if ('count' in query) link += '&count=' + query['count']
|
|
if ('count' in query) link += '&count=' + query['count']
|
|
|
if ('primaryKey' in query) link += '&primaryKey=' + query['primaryKey']
|
|
if ('primaryKey' in query) link += '&primaryKey=' + query['primaryKey']
|
|
|
|
|
+ if ('resolveDepth' in query && !('resolve' in query)) return Promise.reject(new Error('ResolveDepth set but missing resolve="all"'))
|
|
|
if ('resolve' in query) link += '&resolve=' + query['resolve']
|
|
if ('resolve' in query) link += '&resolve=' + query['resolve']
|
|
|
if ('resolveDepth' in query) link += '&resolveDepth=' + query['resolveDepth']
|
|
if ('resolveDepth' in query) link += '&resolveDepth=' + query['resolveDepth']
|
|
|
if ('xlink' in query) link += '&xlink=' + query['xlink'] // NOTE: replace '#' to '/'
|
|
if ('xlink' in query) link += '&xlink=' + query['xlink'] // NOTE: replace '#' to '/'
|