Skip to content

Commit

Permalink
ICL-1556 数据服务查询组件:手动修改条件失效 review by luox
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxianhuii committed Oct 30, 2024
1 parent 3d501b2 commit 2ee1c7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/leaflet/components/dataservicequery/DataServiceQueryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,19 +461,16 @@ export var DataServiceQueryView = ComponentsViewBase.extend({
maxFeatures: maxFeatures
});
} else if (getFeatureMode === 'BOUNDS') {
if (!bounds) {
let value = JSON.parse(queryRangeTextArea.value);
bounds = L.bounds([value.leftBottom.x, value.leftBottom.y], [value.rightTop.x, value.rightTop.y])
}
let value = JSON.parse(queryRangeTextArea.value);
bounds = L.bounds([value.leftBottom.x, value.leftBottom.y], [value.rightTop.x, value.rightTop.y])
queryParam = new GetFeaturesByBoundsParameters({
attributeFilter: attributeFilter,
datasetNames: datasetArr,
bounds: bounds
});
} else if (getFeatureMode === 'BUFFER') {
let bufferDistance = bufferDistanceInput.value;
let defaultGeometryValue = JSON.parse(queryRangeTextArea.value);
let geometryLayer = resultLayer || defaultGeometryValue;
let geometryLayer = JSON.parse(queryRangeTextArea.value);
queryParam = new GetFeaturesByBufferParameters({
attributeFilter: attributeFilter,
datasetNames: datasetArr,
Expand All @@ -482,8 +479,7 @@ export var DataServiceQueryView = ComponentsViewBase.extend({
});
} else if (getFeatureMode === 'SPATIAL') {
let spatialQueryMode = spatialQueryModeSelectName.title;
let defaultGeometryValue = JSON.parse(queryRangeTextArea.value);
let geometryLayer = resultLayer || defaultGeometryValue;
let geometryLayer = JSON.parse(queryRangeTextArea.value);
queryParam = new GetFeaturesByGeometryParameters({
attributeFilter: attributeFilter,
datasetNames: datasetArr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
map.fire('pm:create', {'shape': 'Marker', 'layer': layer.getLayers()[0]});
let boundsLayer = {"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[97.4157714844,42.7368164063],[100.5908203125,42.7917480469],[98.0529785156,41.484375],[97.4157714844,42.7368164063]]]}};
boundsLayer = L.geoJSON(boundsLayer);
map.fire('pm:create', {'shape': 'Rectangle', 'layer': boundsLayer.getLayers()[0]});
map.fire('pm:create', {'shape': 'Polygon', 'layer': boundsLayer.getLayers()[0]});

var analysitBtn = document.getElementsByClassName('component-analysis__analysisbtn--analysis')[0];
analysitBtn.click();
Expand Down

0 comments on commit 2ee1c7e

Please sign in to comment.