|
|
|
@ -18,7 +18,7 @@ import { MaskLayerService } from 'src/app/mask-layer.service';
|
|
|
|
|
import * as ObjectID from 'bson-objectid'; |
|
|
|
|
import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem'; |
|
|
|
|
import { MapFactory } from 'src/modules/map/declare/factory'; |
|
|
|
|
import { IMap } from 'src/modules/map/declare/map'; |
|
|
|
|
import { IMap, IMarker, IMarkOptions } from 'src/modules/map/declare/map'; |
|
|
|
|
declare var AMap: any |
|
|
|
|
|
|
|
|
|
declare global { |
|
|
|
@ -1418,9 +1418,9 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
console.log(666666, this.selectingSitePlan) |
|
|
|
|
|
|
|
|
|
this.map = MapFactory.MapInstance("planContainer", { |
|
|
|
|
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D',
|
|
|
|
|
zoom: 11, //初始化地图层级
|
|
|
|
|
}).self; |
|
|
|
|
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]) |
|
|
|
@ -1452,14 +1452,14 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
// 将 icon 传入 marker
|
|
|
|
|
let startMarker = MapFactory.MarkerInstance({ |
|
|
|
|
position: new AMap.LngLat(element.Point.x, element.Point.y), |
|
|
|
|
position: MapFactory.LngLatInstance(element.Point.x, element.Point.y), |
|
|
|
|
// 将 html 传给 content
|
|
|
|
|
content: markerContent, |
|
|
|
|
// 以 icon 的 [center bottom] 为原点
|
|
|
|
|
//offset: MapFactory.PixelInstance(-13,-30).self,
|
|
|
|
|
offset: MapFactory.PixelInstance(-13, 30).self, |
|
|
|
|
//offset: MapFactory.PixelInstance(-13,-30,
|
|
|
|
|
offset: MapFactory.PixelInstance(-13, 30), |
|
|
|
|
draggable: editable == '1' ? true : false, |
|
|
|
|
}).self |
|
|
|
|
} as IMarkOptions) |
|
|
|
|
|
|
|
|
|
startMarker.id = element.Id |
|
|
|
|
startMarker.on('click', (e) => { |
|
|
|
@ -2239,14 +2239,14 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
'</div>'; |
|
|
|
|
|
|
|
|
|
// 将 icon 传入 marker
|
|
|
|
|
let startMarker = MapFactory.MarkerInstance({ |
|
|
|
|
position: new AMap.LngLat(e.lnglat.lng, e.lnglat.lat), |
|
|
|
|
let startMarker: IMarker = MapFactory.MarkerInstance({ |
|
|
|
|
position: MapFactory.LngLatInstance(e.lnglat.lng, e.lnglat.lat), |
|
|
|
|
// 将 html 传给 content
|
|
|
|
|
content: markerContent, |
|
|
|
|
// 以 icon 的 [center bottom] 为原点
|
|
|
|
|
offset: MapFactory.PixelInstance(-13, -30).self, |
|
|
|
|
offset: MapFactory.PixelInstance(-13, -30), |
|
|
|
|
draggable: true, |
|
|
|
|
}).self; |
|
|
|
|
} as IMarkOptions); |
|
|
|
|
|
|
|
|
|
startMarker.id = id |
|
|
|
|
startMarker.on('click', (e) => { |
|
|
|
|