Skip to content

Commit 974d4d3

Browse files
committed
【bug】1) 删除重复的colorpicker中的Util和color
2)webmap接口修改并且修复了sonar上bug
1 parent 7e63d34 commit 974d4d3

File tree

10 files changed

+7176
-11503
lines changed

10 files changed

+7176
-11503
lines changed

dist/openlayers/iclient9-openlayers-es6.js

Lines changed: 217 additions & 1610 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openlayers/iclient9-openlayers.js

Lines changed: 6820 additions & 8360 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openlayers/iclient9-openlayers.min.js

Lines changed: 47 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/openlayers/core/Util.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import ol from 'openlayers';
55
import {Unit, Bounds, GeoJSON as GeoJSONFormat, FilterParameter,
66
GetFeaturesBySQLParameters,
7-
GetFeaturesBySQLService
7+
GetFeaturesBySQLService,
8+
QueryBySQLParameters,
9+
QueryOption
810
} from '@supermap/iclient-common';
911

1012
ol.supermap = ol.supermap || {};
@@ -412,6 +414,35 @@ export class Util {
412414
getFeatureBySQLService.processAsync(getFeatureBySQLParams);
413415
}
414416

417+
static queryFeatureBySQL(url, layerName, attributeFilter, fields, epsgCode, processCompleted, processFaild, startRecord, recordLength, onlyAttribute) {
418+
var queryParam, queryBySQLParams, queryBySQLService;
419+
queryParam = new FilterParameter({
420+
name: layerName,
421+
attributeFilter: attributeFilter
422+
});
423+
if (fields) {
424+
queryParam.fields = fields;
425+
}
426+
var params = {
427+
queryParams: [queryParam]
428+
};
429+
if (onlyAttribute) {
430+
params.queryOption = QueryOption.ATTRIBUTE;
431+
}
432+
startRecord && (params.startRecord = startRecord);
433+
recordLength && (params.expectCount = recordLength);
434+
if (epsgCode) {
435+
params.prjCoordSys = {
436+
epsgCode: epsgCode
437+
}
438+
}
439+
queryBySQLParams = new QueryBySQLParameters(params);
440+
queryBySQLService = new ol.supermap.QueryService(url);
441+
queryBySQLService.queryBySQL(queryBySQLParams, function (data) {
442+
data.type === 'processCompleted' ? processCompleted(data) : processFaild(data)
443+
});
444+
}
445+
415446
}
416447

417448
ol.supermap.Util = Util;

0 commit comments

Comments
 (0)