diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index 267b7b6..1abb2e8 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -1420,7 +1420,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.map = MapFactory.MapInstance("planContainer", { viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D', zoom: 11, //初始化地图层级 - }).self; + }); if (this.selectingSitePlan.defaultCenter) { this.map.setZoom(this.selectingSitePlan.zoomLevel); //设置地图层级 this.map.setCenter([this.selectingSitePlan.defaultCenter.x, this.selectingSitePlan.defaultCenter.y]) diff --git a/src/modules/map/declare/map-tools.ts b/src/modules/map/declare/map-tools.ts index 6cf9152..11b01e8 100644 --- a/src/modules/map/declare/map-tools.ts +++ b/src/modules/map/declare/map-tools.ts @@ -1,6 +1,10 @@ export default class MapTools { public static InstanceConvert(obj: any): any { + debugger + if (obj == null) { + return + } var propNames = Object.getOwnPropertyNames(obj.prototype); for (var name in propNames) { if (obj[name].discriminator === "ISelf") { diff --git a/src/modules/map/declare/map.d.ts b/src/modules/map/declare/map.d.ts index 6338cb4..42eb9bd 100644 --- a/src/modules/map/declare/map.d.ts +++ b/src/modules/map/declare/map.d.ts @@ -26,8 +26,7 @@ export interface IMapOptions { } export interface IMarker extends ISelf { - get id(): string; - set id(str: string); + id: string; on(eventName: string, callback: Function); }