Browse Source

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

haojianlong 5 năm trước cách đây
mục cha
commit
6e32d1a913
1 tập tin đã thay đổi với 8 bổ sung4 xóa
  1. 8 4
      saga-web-fengmap/src/parser/SFengParser.ts

+ 8 - 4
saga-web-fengmap/src/parser/SFengParser.ts

@@ -222,6 +222,10 @@ export class SFengParser extends SParser {
     version: number | null = null;
     /** 顶楼地址img */
     frImg: string = "";
+    /** 图形Y轴最大值 */
+    maxY: number | null = null;
+    /** 图形Y轴最大值 */
+    minX: number | null = null;
 
     /** 构造体 */
     constructor(
@@ -254,8 +258,8 @@ export class SFengParser extends SParser {
         let searchAnalyser = new fengmap.FMSearchAnalyser(this.fmap);
         // 创建搜索请求体对象
         let searchReq = new fengmap.FMSearchRequest();
-        const minx = this.fmap.minX;
-        const maxy = this.fmap.maxY;
+        const minx = this.minX || this.fmap.minX;
+        const maxy = this.maxY || this.fmap.maxY;
         searchReq.groupID = groupId;
         searchReq.type = "Model";
         searchAnalyser.query(searchReq, (result: any) => {
@@ -417,8 +421,8 @@ export class SFengParser extends SParser {
      * @param _fn
      * */
     loadFloor(groupId: string, _fn: Function): any {
-        const minx = this.fmap.minX;
-        const maxy = this.fmap.maxY;
+        const minx = this.minX || this.fmap.minX;
+        const maxy = this.maxY || this.fmap.maxY;
         this.fmap.getDatasByAlias(Number(groupId), "extent", (res: any) => {
             let index = res.gdata.geo.indexOf("(");
             let str = res.gdata.geo.substring(index);