From c45beb01764602cb2550fb19f114a38eadec0365 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 21 Dec 2021 10:46:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BC=98=E5=8C=96=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E8=81=9A=E5=90=88=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.ts | 1 + .../linkage-forces.component.ts | 1 + .../water-collection.component.ts | 1 + .../gis-labeling/gis-labeling.component.html | 2 +- .../gis-labeling/gis-labeling.component.ts | 37 ++++-- .../water-road/water-road.component.ts | 1 + .../collection-tools.component.html | 10 +- .../collection-tools.component.scss | 116 +++++++++++++++--- src/index.html | 8 +- src/modules/map/declare/factory.ts | 2 +- src/modules/map/declare/gaode-map.ts | 26 ++-- src/modules/map/declare/keda-map.ts | 3 + src/modules/map/declare/map.d.ts | 93 +++++++------- src/styles.scss | 2 +- 14 files changed, 203 insertions(+), 100 deletions(-) diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index 26b8998..c952cec 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -799,6 +799,7 @@ export class FireForceComponent implements OnInit { } this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.cluster.on('click', (e) => { diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 92c2a83..1c31b36 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -166,6 +166,7 @@ export class LinkageForcesComponent implements OnInit { this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.cluster.on('click',(e)=>{ diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts index 9c0e730..c28d5ba 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -120,6 +120,7 @@ export class WaterCollectionComponent implements OnInit { } this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.cluster.on('click',(e)=>{ diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.html b/src/app/gis-management/gis-labeling/gis-labeling.component.html index edd9fd5..4b0676e 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.html +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.html @@ -90,7 +90,7 @@
- +
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts index 52da73d..f387012 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -211,7 +211,7 @@ export class GisLabelingComponent implements OnInit { }) } //地图范围圆圈---重点单位 - circle:ICircle = MapFactory.CircleInstance({ + circle: ICircle = MapFactory.CircleInstance({ center: null, radius: 0, //半径 strokeOpacity: 1, @@ -223,7 +223,7 @@ export class GisLabelingComponent implements OnInit { zIndex: 50, }) //地图范围圆圈---水源 - circleofwater:ICircle = MapFactory.CircleInstance({ + circleofwater: ICircle = MapFactory.CircleInstance({ center: null, radius: 0, //半径 strokeOpacity: 1, @@ -235,7 +235,7 @@ export class GisLabelingComponent implements OnInit { zIndex: 50, }) //地图范围圆圈---消防力量 - circleoffireForce:ICircle = MapFactory.CircleInstance({ + circleoffireForce: ICircle = MapFactory.CircleInstance({ center: null, radius: 0, //半径 strokeOpacity: 1, @@ -247,7 +247,7 @@ export class GisLabelingComponent implements OnInit { zIndex: 50, }) //地图范围圆圈---联动力量 - circleoflinkageForces:ICircle = MapFactory.CircleInstance({ + circleoflinkageForces: ICircle = MapFactory.CircleInstance({ center: null, radius: 0, //半径 strokeOpacity: 1, @@ -402,6 +402,7 @@ export class GisLabelingComponent implements OnInit { } this.unitCluster = MapFactory.MarkerClusterInstance(this.map, unitMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.unitCluster.on('click', (e) => { @@ -456,10 +457,17 @@ export class GisLabelingComponent implements OnInit { this.renderer2.listen(this.elementRef.nativeElement.querySelector('#seePlan'), 'click', (event) => { this.seePlan(item) })//查看预案点击事件 this.renderer2.listen(this.elementRef.nativeElement.querySelector('#share'), 'click', (event) => { this.share(item) })//分享点击事件 } - },this) + }, this) + } + setMaxZoom() { + this.unitCluster ? this.unitCluster.setMaxZoom(0) : null + this.waterCluster ? this.waterCluster.setMaxZoom(0) : null + this.fireForceCluster ? this.fireForceCluster.setMaxZoom(0) : null + this.linkageForcesCluster ? this.linkageForcesCluster.setMaxZoom(0) : null } + //取消显示单位 resetUnit() { this.keyUnitForm.reset() @@ -578,6 +586,7 @@ export class GisLabelingComponent implements OnInit { } this.fireForceCluster = MapFactory.MarkerClusterInstance(this.map, fireForceMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -727,6 +736,7 @@ export class GisLabelingComponent implements OnInit { this.linkageForcesCluster = MapFactory.MarkerClusterInstance(this.map, linkageForcesMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -901,6 +911,7 @@ export class GisLabelingComponent implements OnInit { // } this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -913,7 +924,7 @@ export class GisLabelingComponent implements OnInit { if (e.clusterData.length == 1) { } - },this) + }, this) } //取消显示水源 @@ -1048,9 +1059,9 @@ export class GisLabelingComponent implements OnInit { zIndex: 0, //叠加层级 resizeEnable: true //是否监控地图容器尺寸变化, }) - that.map = MapFactory.MapInstance('map', { - layers: [layer], - WebGLParams: {preserveDrawingBuffer: true} + that.map = MapFactory.MapInstance('map', { + layers: [layer], + WebGLParams: { preserveDrawingBuffer: true } }); that.map.setCity('上海市'); that.mouseTool = MapFactory.MouseToolInstance(that.map); @@ -1063,7 +1074,7 @@ export class GisLabelingComponent implements OnInit { measureDistance; //测距离 distanceList = []; //测距离 点和线 measureArea; //测面积 - mouseTool:IMouseTool;//二合一测距和侧面积 + mouseTool: IMouseTool;//二合一测距和侧面积 checkRadio = false //判断测距和侧面积是否选中 //测距离 开始 @@ -1339,7 +1350,7 @@ export class GisLabelingComponent implements OnInit { var autoOptions = { city: info.city } let keywords e == 0 ? keywords = that.routeStart : keywords = that.routeEnd - var autoComplete = MapFactory.AutocompleteInstance(autoOptions,that); + var autoComplete = MapFactory.AutocompleteInstance(autoOptions, that); autoComplete.search(keywords, function (status, result) { if (result && result.tips && result.tips.length) { //搜索到数据时 that._ngZone.run(() => { @@ -1432,7 +1443,7 @@ export class GisLabelingComponent implements OnInit { this.snackBar.open('未查询到终点坐标信息,请输入有效地址', '确定', config); return } else { - this.routeGIS.search(this,this.startCoordinate, this.endCoordinate, + this.routeGIS.search(this, this.startCoordinate, this.endCoordinate, function (status, result) { if (status === 'complete') { that.routes = result.routes[0] @@ -1455,7 +1466,7 @@ export class GisLabelingComponent implements OnInit { }); // 根据起终点名称规划驾车导航路线 - this.routeGIS.search(this,this.startCoordinate, this.endCoordinate, + this.routeGIS.search(this, this.startCoordinate, this.endCoordinate, function (status, result) { if (status === 'complete') { that.routes = result.routes[0] diff --git a/src/app/key-unit/water-road/water-road.component.ts b/src/app/key-unit/water-road/water-road.component.ts index 1567400..c69f3a9 100644 --- a/src/app/key-unit/water-road/water-road.component.ts +++ b/src/app/key-unit/water-road/water-road.component.ts @@ -263,6 +263,7 @@ export class WaterRoadComponent implements OnInit { } this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 + maxZoom :15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.waterCluster.on('click',(e)=>{ diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index ae15467..47e5d16 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -53,7 +53,7 @@
- - +
+
+ + +
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.scss b/src/app/ui/collection-tools-building/collection-tools.component.scss index 3d072d4..23a15fe 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.scss +++ b/src/app/ui/collection-tools-building/collection-tools.component.scss @@ -1,12 +1,15 @@ @import "./panel.scss"; + html { ::-webkit-scrollbar { display: none; } } + .icongray { color: #d9d0dc; } + .content { width: 100%; height: 100%; @@ -30,38 +33,46 @@ html { align-items: center; min-height: 40px; background-color: #fff; + .zoom { display: flex; align-items: center; margin-left: 15px; cursor: pointer; + img { margin-right: 3px; } } + .marginLeftRight { margin: 0 8px; font-size: 16px; user-select: none; cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } } + .copytobutn { width: 60px; min-width: 60px; display: flex; justify-content: center; } + span { height: 24px; line-height: 24px; } + .patternSwitch { position: absolute; right: 140px; + span { font-size: 18px; cursor: pointer; @@ -71,15 +82,18 @@ html { border-radius: 3px; padding: 0 5px; } + .selectedPattern { background-color: #2196f3; color: white; } } + .rightSave { cursor: pointer; position: absolute; right: 60px; + label { vertical-align: middle; color: #279fff; @@ -89,15 +103,6 @@ html { //头部操作栏 .headerOperate { - img { - width: 24px; - height: 24px; - vertical-align: middle; - margin-left: 1px; - } - span { - font-size: 15px; - } flex: 5%; display: flex; align-items: center; @@ -105,23 +110,36 @@ html { box-sizing: border-box; margin: 3px 0; background-color: white; - button { + white-space: nowrap; + overflow-x: scroll; + span { + font-size: 15px; + } + div { + cursor: default; border: 0.5px solid rgb(208, 211, 214); margin: 0 2px; + display: flex; + align-items: center; + box-sizing: border-box; + padding: 3px 8px; + height: 96%; + border-radius: 3px; } + .editdeletebtn { display: none; } + .bigeditdeletebtn { - max-width: 200px; .bigeditdeletebtnname { - display: inline-block; - max-width: 120px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + // display: inline-block; + // white-space: nowrap; + // overflow: hidden; + // text-overflow: ellipsis; } } + .bigeditdeletebtn:hover { .editdeletebtn { display: inline-block; @@ -135,6 +153,7 @@ html { cursor: pointer; vertical-align: middle; } + //左右两侧功能栏 统一样式 .publicCss { border-radius: 5px; @@ -142,14 +161,17 @@ html { height: 100%; top: 0; } + .functionalDomain { flex: 90%; overflow: hidden; + .functionalDomainContent { position: relative; width: 100%; height: 100%; } + .functionalDomainLeft { background-color: #fff; display: flex; @@ -161,6 +183,7 @@ html { width: 235px; left: 0; z-index: 112; + .leftDragDiv { position: absolute; right: 0; @@ -170,6 +193,7 @@ html { cursor: e-resize; } } + .functionalDomainRight { z-index: 1001; margin-right: 0px; @@ -184,15 +208,18 @@ html { min-width: 195px; width: 195px; } + .functionalDomainRight { width: 195px; } } + //右边导航栏显示隐藏 .togglePanel2 { margin-right: -2000px; transition: margin-right 1s; } + //左侧导航栏显示隐藏 .togglePanel { margin-left: -2000px; @@ -205,12 +232,14 @@ html { width: 100%; height: 35px; background-color: #464646; + div { width: 50%; height: 35px; line-height: 35px; background-color: #595959; border-radius: 5px; + span { color: white; font-size: 14px; @@ -224,13 +253,16 @@ html { .property { display: flex; flex-flow: column; + .siteproperty { height: 100%; overflow-y: auto; + p { color: #9c9fa5; padding-left: 5px; } + .siteproperty_size { background-color: #e3e3e3; width: 93%; @@ -238,6 +270,7 @@ html { border-radius: 3px; min-height: 21px; } + .rightAttribute { width: 12%; height: 99.5%; @@ -248,54 +281,68 @@ html { border: 2px solid #464646; } } + .assetsproperty { overflow-y: auto; height: 100%; + p { color: #9c9fa5; margin: 1px 0 3px 8px; font-size: 14px; } + span { font-size: 15px; } + input { height: 18px; } + .biginput { display: block; width: 88%; margin: 0 auto; } + .smallinput { display: block; width: 19%; margin-left: 8px; } + .textarea { display: block; width: 88%; height: 50px; margin: 0 auto; } + .swiper-button-next { right: 6px; } + .swiper-button-prev { left: 6px; } + .swiper-container { // --swiper-theme-color: #ff6600;/* 设置Swiper风格 */ // --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */ - --swiper-navigation-size: 20px; /* 设置按钮大小 */ + --swiper-navigation-size: 20px; + /* 设置按钮大小 */ } + .hoverred:hover { color: rgb(187, 28, 28); } + .selectDiv { height: 21px; position: relative; margin-bottom: 5px; + select { width: 98px; height: 22px; @@ -307,9 +354,11 @@ html { border-radius: 2px; } } + .colorBigDiv { width: 88%; margin-left: 8px; + .colorBigTemplateDiv { span { color: #9c9fa5; @@ -317,6 +366,7 @@ html { height: 26px; line-height: 26px; } + .colorTemplateDiv { width: 65%; height: 22px; @@ -334,6 +384,7 @@ html { float: left; border: 2px solid white; } + .coloractive { border: 2px solid black; } @@ -341,6 +392,7 @@ html { } } } + .hideAllTreeNode { box-sizing: border-box; margin: 3px 0; @@ -349,24 +401,29 @@ html { height: 24px; line-height: 24px; display: flex; + label { display: inline-block; flex: 1; cursor: pointer; } } + //右侧消防要素 .firecategories { background-color: #fff; position: relative; display: flex; flex-flow: column; + .firecategoriesTree { overflow-y: auto; height: 100%; + mat-tree-node { position: relative; } + .isLookCss { position: absolute; right: 6px; @@ -382,8 +439,10 @@ div:focus { //没有图片时显示无图片背景图 .noImgCss { background: url(../../../assets/images/noImg.png) no-repeat center center; - background-size: 88% 100%; /*按比例缩放*/ + background-size: 88% 100%; + /*按比例缩放*/ } + .input { width: 18px; height: 18px; @@ -400,12 +459,15 @@ div:focus { font-size: 13px; cursor: pointer; } + .treeNode:hover { background-color: #ccebf8; } + .isLookPattern { display: none; } + .treeText { overflow: hidden; white-space: nowrap; @@ -421,6 +483,7 @@ div:focus { overflow: hidden; right: 0; } + .weatherBox { height: 40px; width: 700px; @@ -428,21 +491,25 @@ div:focus { position: absolute; right: 0; transition: right linear 0.5s; + .openbtn { font-size: 45px; height: 45px; width: 40px; } + .name { font-size: 16px; vertical-align: middle; margin-left: 3px; } + input { width: 140px; height: 22px; margin-left: 3px; } + select { width: 96px; height: 25px; @@ -450,12 +517,15 @@ div:focus { vertical-align: middle; } } + .open { right: 0px; } + .close { right: -622px; } + .bottomCss { position: absolute; left: 232px; @@ -466,6 +536,7 @@ div:focus { z-index: 100; background-color: white; border: 1px solid #464646; + .dragDiv { width: 100%; height: 3px; @@ -474,9 +545,11 @@ div:focus { z-index: 1000; cursor: n-resize; } + .title { height: 35px; background-color: #464646; + div { background-color: #464646; float: left; @@ -486,10 +559,12 @@ div:focus { padding-left: 5px; cursor: pointer; } + .detailsAndattentBtn { background-color: #595959; } } + .body { textarea { width: 100%; @@ -497,3 +572,8 @@ div:focus { } } } + + +::-webkit-scrollbar { + height: 6px; +} diff --git a/src/index.html b/src/index.html index 2ccf502..7aab4f9 100644 --- a/src/index.html +++ b/src/index.html @@ -23,10 +23,10 @@ - - - + + + diff --git a/src/modules/map/declare/factory.ts b/src/modules/map/declare/factory.ts index 909f25a..fcdbaf8 100644 --- a/src/modules/map/declare/factory.ts +++ b/src/modules/map/declare/factory.ts @@ -30,7 +30,7 @@ export class MapFactory { } } - public static MarkerClusterInstance(map: IMap, list: Object[], renderObj: { gridSize: number, render: IRenderClusterMarker }): IMarkerCluster { + public static MarkerClusterInstance(map: IMap, list: Object[], renderObj: { gridSize: number, render: IRenderClusterMarker ,maxZoom: number}): IMarkerCluster { switch (mapSupplier) { case 1: return new GaoDeMarkerCluster(map, list, renderObj); case 2: return new KedaMarkerCluster(map, list, renderObj); diff --git a/src/modules/map/declare/gaode-map.ts b/src/modules/map/declare/gaode-map.ts index 8a870a1..4fbef8e 100644 --- a/src/modules/map/declare/gaode-map.ts +++ b/src/modules/map/declare/gaode-map.ts @@ -253,7 +253,7 @@ export class GaoDeMarker extends GaodeBasic implements IMarker { this._position = this.self._position; } getLngLatByMarkerEvent(map: IMap, e: any): ILngLat { - return map.containerToLngLat(e.pixel); + return map.containerToLngLat(e.pixel); } setContent(html: string) { return this.self.setContent(html) @@ -285,12 +285,16 @@ export class GaoDeMarkerCluster extends GaodeBasic implements IMarkerCluster { this.self = new AMap.MarkerCluster(map.self, list, conf) }); } + setMaxZoom(zoom: number) { + this.self.setMaxZoom(zoom) + } on(eventName: string, callback: Function): void { - this.self.on(eventName, callback); + this.self.on(eventName, callback); } setData(list: any[]) { - this.self.setData(list) + this.self.setData(list) } + } export class GaoDeLngLat extends GaodeBasic implements ILngLat { @@ -369,8 +373,8 @@ export class GaodeDriving extends GaodeBasic implements IDriving { }) } search(component: any, posStart: ILngLat, posEnd: ILngLat, callback: DrivingSearchCallback) { - return this.self.search(posStart.getArray(), posEnd.getArray(), (status, result)=>{ - callback.call(component,status,result) + return this.self.search(posStart.getArray(), posEnd.getArray(), (status, result) => { + callback.call(component, status, result) }) } clear() { @@ -388,14 +392,14 @@ export class GaodeAutocomplete extends GaodeBasic implements IAutocomplete { }) } on(eventName: string, callback: AutocompleteSelectCallback) { - this.self.on(eventName, (event) => { - callback.call(this.component, event) - }) + this.self.on(eventName, (event) => { + callback.call(this.component, event) + }) } search(address: string, callback: AutocompleteSearchCallback) { - this.self.search(address, (status, result) => { - callback.call(this.component, status, result) - }) + this.self.search(address, (status, result) => { + callback.call(this.component, status, result) + }) } } diff --git a/src/modules/map/declare/keda-map.ts b/src/modules/map/declare/keda-map.ts index 7a3eb94..7064f91 100644 --- a/src/modules/map/declare/keda-map.ts +++ b/src/modules/map/declare/keda-map.ts @@ -694,6 +694,9 @@ export class KedaMarkerCluster extends KedaBasic implements IMarkerCluster { //M // } // }) } + setMaxZoom(zoom: number) { + throw new Error('Method not implemented.'); + } on(eventName: string, callback: MarkerClusterCallback, component?: any): void { let _this =this; if(!this.id){ diff --git a/src/modules/map/declare/map.d.ts b/src/modules/map/declare/map.d.ts index c4604e5..bcbd7a4 100644 --- a/src/modules/map/declare/map.d.ts +++ b/src/modules/map/declare/map.d.ts @@ -7,26 +7,26 @@ export class ClickOptions { lnglat: ILngLat pixel: IPixel type: string - target: { id:string } + target: { id: string } } -type EventCallback = (event?:ClickOptions)=>void; +type EventCallback = (event?: ClickOptions) => void; export interface IMap extends ISelf { on(eventName: string, callback: EventCallback, component?: any); - add(obj: IMarker|ITileLayer|any); - remove(obj: IMarker|ITileLayer|any); + add(obj: IMarker | ITileLayer | any); + remove(obj: IMarker | ITileLayer | any); clearMap(); - containerToLngLat(e:IPixel): ILngLat; //地图容器像素坐标转经纬度 + containerToLngLat(e: IPixel): ILngLat; //地图容器像素坐标转经纬度 setCity(city: string); getCity(callback: Function): any; setZoom(zoom: number); setZoomAndCenter(zoom: number, pos: number[]); getZoom(): number; - setCenter(pos: number[]|ILngLat); + setCenter(pos: number[] | ILngLat); getCenter(): ILngLat; getBounds(): any; - distance(a:number[],b:number[]): any; - setAdministrativeAreaStyle(component:any,getData?:Function,setData?:Function): any; //自定义 行政区划 样式 + distance(a: number[], b: number[]): any; + setAdministrativeAreaStyle(component: any, getData?: Function, setData?: Function): any; //自定义 行政区划 样式 } export interface IMapOptions { @@ -36,26 +36,27 @@ export interface IMapOptions { export interface IMarker extends ISelf { id: string; - _position:number[]; + _position: number[]; on(eventName: string, callback: EventCallback, component?: any); - setPosition(x:ILngLat|number[]) - setContent(html:string) + setPosition(x: ILngLat | number[]) + setContent(html: string) setMap(); - getLngLatByMarkerEvent(map:IMap,e:any):ILngLat; + getLngLatByMarkerEvent(map: IMap, e: any): ILngLat; } export class MarkerClusterOptions { //聚合物 click 数据类型 - cluster:any[] - clusterData:any[] - lnglat:ILngLat - target:any - markers:IMarker[] + cluster: any[] + clusterData: any[] + lnglat: ILngLat + target: any + markers: IMarker[] } -type MarkerClusterCallback = (event:MarkerClusterOptions)=>void; +type MarkerClusterCallback = (event: MarkerClusterOptions) => void; export interface IMarkerCluster extends ISelf { on(eventName: string, callback: MarkerClusterCallback, component?: any): void; setData(list: any[]); + setMaxZoom(zoom: number) } type HtmlRender = (...args) => string | HTMLElement; @@ -77,19 +78,19 @@ export class IMarkOptions { } export interface IPixel extends ISelf { - x:number - y:number - getArray():number[] + x: number + y: number + getArray(): number[] } export interface ILngLat extends ISelf { - typeName:string + typeName: string lng: number lat: number - KL:number - kT:number - offset(x: number, y: number):ILngLat - getArray():number[] + KL: number + kT: number + offset(x: number, y: number): ILngLat + getArray(): number[] } export interface ILayer extends ISelf { @@ -127,21 +128,21 @@ export class DrivingSearch { //Driving Search() 数据类型 time: number tolls_distance: number steps: DrivingSearchSteps[] - routes:any[] //伪代码 + routes: any[] //伪代码 } export class DrivingSearchSteps { //Driving Search() Steps 数据类型 - instruction:string - orientation:string + instruction: string + orientation: string road: string distance: number time: number tolls_distance: number } -type DrivingSearchCallback = (status:string,searchData:DrivingSearch)=>void; +type DrivingSearchCallback = (status: string, searchData: DrivingSearch) => void; export interface IDriving extends ISelf { clear(); - search(component: any,posStart: ILngLat, posEnd: ILngLat, callback:DrivingSearchCallback); + search(component: any, posStart: ILngLat, posEnd: ILngLat, callback: DrivingSearchCallback); } export class AutocompleteSearch { //Autocomplete Search() 数据类型 @@ -156,13 +157,13 @@ export class AutocompleteSelect { //GaoDe POI 数据类型 district: string location: ILngLat type: string - poi:{ location: ILngLat } + poi: { location: ILngLat } } -type AutocompleteSearchCallback = (status:string,searchData:AutocompleteSearch)=>void; -type AutocompleteSelectCallback = (event:AutocompleteSelect)=>void; +type AutocompleteSearchCallback = (status: string, searchData: AutocompleteSearch) => void; +type AutocompleteSelectCallback = (event: AutocompleteSelect) => void; export interface IAutocomplete extends ISelf { - search(address: string,callback: AutocompleteSearchCallback) + search(address: string, callback: AutocompleteSearchCallback) on(eventName: string, callback: AutocompleteSelectCallback) } @@ -171,26 +172,26 @@ export class PlaceSearchSearch { //PlaceSearch Search() 数据类型 poiList: PlaceSearchSearchTips } export class PlaceSearchSearchTips { //PlaceSearch Search() 数据类型 - pois:AutocompleteSelect[] - pageIndex:number - pageSize:number - count:number + pois: AutocompleteSelect[] + pageIndex: number + pageSize: number + count: number } -type PlaceSearchCallback = (status:string,searchData:PlaceSearchSearch)=>void; +type PlaceSearchCallback = (status: string, searchData: PlaceSearchSearch) => void; export interface IPlaceSearch extends ISelf { - search(text:string, callback: PlaceSearchCallback); + search(text: string, callback: PlaceSearchCallback); } export interface IMouseTool extends ISelf { - rule(options:any) - measureArea(options:any) - close(isTrue:boolean) + rule(options: any) + measureArea(options: any) + close(isTrue: boolean) } export interface IInfoWindow extends ISelf { - open(map:IMap); - listen(html:any, event:string, callback: Function) + open(map: IMap); + listen(html: any, event: string, callback: Function) } export interface ICircle extends ISelf { diff --git a/src/styles.scss b/src/styles.scss index a3e5af9..e1d5e9b 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -448,4 +448,4 @@ td { .carTreeDropdown{ max-height: 239px; -} \ No newline at end of file +}