import * as KMap from "@/utils/ol-map/KMap";
import * as util from "@/common/ol_common.js";
import config from "@/api/config.js";
/**
 * @description 地图层对象
 */
class IndexMap {
  constructor() {
    let that = this;
    let vectorStyle = new KMap.VectorStyle();
    this.vectorStyle = vectorStyle;
  }

  initMap(location, target) {
    let level = 16;
    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 12.5, 23);
    let xyz2 = config.base_img_url3 + 'map/lby/{z}/{x}/{y}.png';
    this.kmap.addXYZLayer(xyz2,{minZoom:12.5,maxZoom:23});
  }
}

export default IndexMap;
