소스 검색

蜂鸟图支持传入最大值最小值更改

haojianlong 5 년 전
부모
커밋
f21c17d3e0
1개의 변경된 파일13개의 추가작업 그리고 2개의 파일을 삭제
  1. 13 2
      saga-web-fengmap/src/parser/SFengParser.ts

+ 13 - 2
saga-web-fengmap/src/parser/SFengParser.ts

@@ -258,8 +258,19 @@ export class SFengParser extends SParser {
         let searchAnalyser = new fengmap.FMSearchAnalyser(this.fmap);
         // 创建搜索请求体对象
         let searchReq = new fengmap.FMSearchRequest();
-        const minx = this.minX || this.fmap.minX;
-        const maxy = this.maxY || this.fmap.maxY;
+        let minx: number, maxy: number;
+        if (this.minX) {
+            minx = this.minX;
+        } else {
+            minx = this.fmap.minX;
+            this.minX = minx;
+        }
+        if (this.maxY) {
+            maxy = this.maxY;
+        } else {
+            maxy = this.fmap.maxY;
+            this.maxY = maxy;
+        }
         searchReq.groupID = groupId;
         searchReq.type = "Model";
         searchAnalyser.query(searchReq, (result: any) => {