Browse Source

gis功能测试

上海一张图
陈鹏飞 4 years ago
parent
commit
dd7b077258
  1. 2
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  2. 4
      src/modules/map/declare/map-tools.ts
  3. 3
      src/modules/map/declare/map.d.ts

2
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])

4
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") {

3
src/modules/map/declare/map.d.ts vendored

@ -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);
}

Loading…
Cancel
Save