( url, layerName, attributeFilter, fields, epsgCode, processCompleted, processFaild, startRecord, recordLength, onlyAttribute )
| 20 | getFeatureBySQLWithConcurrent(url, datasetNames, processCompleted, processFaild, serviceOptions, targetEpsgCode, restDataSingleRequestCount); |
| 21 | } |
| 22 | export function queryFeatureBySQL( |
| 23 | url, |
| 24 | layerName, |
| 25 | attributeFilter, |
| 26 | fields, |
| 27 | epsgCode, |
| 28 | processCompleted, |
| 29 | processFaild, |
| 30 | startRecord, |
| 31 | recordLength, |
| 32 | onlyAttribute |
| 33 | ) { |
| 34 | const queryParam = new FilterParameter({ |
| 35 | name: layerName, |
| 36 | attributeFilter: attributeFilter |
| 37 | }); |
| 38 | if (fields) { |
| 39 | queryParam.fields = fields; |
| 40 | } |
| 41 | const params = { |
| 42 | queryParams: [queryParam] |
| 43 | }; |
| 44 | if (onlyAttribute) { |
| 45 | params.queryOption = QueryOption.ATTRIBUTE; |
| 46 | } |
| 47 | startRecord && (params.startRecord = startRecord); |
| 48 | recordLength && (params.expectCount = recordLength); |
| 49 | if (epsgCode) { |
| 50 | params.prjCoordSys = { |
| 51 | epsgCode: epsgCode |
| 52 | }; |
| 53 | } |
| 54 | const queryBySQLParams = new QueryBySQLParameters(params); |
| 55 | const queryBySQLService = new QueryService(url); |
| 56 | queryBySQLService.queryBySQL(queryBySQLParams, function (data) { |
| 57 | data.type === 'processCompleted' ? processCompleted(data) : processFaild(data); |
| 58 | }); |
| 59 | } |
| 60 | |
| 61 | export function getFeatureBySQLWithConcurrent( |
| 62 | url, |
no test coverage detected