Explorar o código

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

haojianlong %!s(int64=5) %!d(string=hai) anos
pai
achega
f21c17d3e0
Modificáronse 1 ficheiros con 13 adicións e 2 borrados
  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) => {