UNPKG

@orca-fe/x-map

Version:
28 lines (27 loc) 696 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AbstractMarker = void 0; class AbstractMarker { setLayer(layer) { this.layer = layer; this.updatePosition(); } } exports.AbstractMarker = AbstractMarker; class AbstractLayer { constructor() { this.markers = new Set(); } updatePosition() { this.markers.forEach((marker) => { marker.updatePosition(); }); } setMap(map) { this.map = map; // 更新完 map 之后,重新触发该图层的位置更新 this.updatePosition(); } destroy() { } } exports.default = AbstractLayer;