Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import ol from 'openlayers';
import {
MapvCanvasLayer
} from './MapvCanvasLayer';
import {
baiduMapLayer
} from "mapv";
var BaiduMapLayer = baiduMapLayer ? baiduMapLayer.__proto__ : Function;
/**
* @class MapvLayer
* @classdesc MapV 图层类。
* @private
* @param {Object} map - 地图。
* @param {Mapv.DataSet} [dataSet] - 数据集。
* @param {Object} options - 参数。
* @param {number} mapWidth - 地图宽度。
* @param {number} mapHeight - 地图高度。
* @param {Object} source - 资源。
* @param {number} options.width - 画布宽。
* @param {number} options.height - 画布高。
* @param {string} [options.paneName='mapPane'] - 窗口名。
* @param {string} [options.context] - 内容。
* @param {number} [options.zIndex] - 层级。
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import L from 'leaflet';
import { baiduMapLayer } from 'mapv';
import { getMeterPerMapUnit } from '../../core/Util';
var BaseLayer = baiduMapLayer ? baiduMapLayer.__proto__ : Function;
/**
* @class L.supermap.MapVRenderer
* @classdesc 地图渲染类。
* @category Visualization MapV
* @private
* @extends mapv.BaseLayer
* @param {L.Map} map - 待渲染的地图。
* @param {L.Layer} layer - 待渲染的图层。
* @param {DataSet} dataSet - 待渲染的数据集。
* @param {Object} options - 渲染的参数。
*/
export class MapVRenderer extends BaseLayer {
constructor(map, layer, dataSet, options) {
super(map, dataSet, options);
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import { baiduMapLayer } from 'mapv';
import mapboxgl from 'mapbox-gl';
import { getMeterPerMapUnit } from '@supermap/iclient-common';
var BaseLayer = baiduMapLayer ? baiduMapLayer.__proto__ : Function;
/**
* @private
* @class MapvRenderer
* @classdesc MapV图层渲染。
* @param {Object} map - 地图。
* @param {Object} layer - 图层。
* @param {MapV.DataSet} dataSet - 数据集。
* @param {Object} options - 交互时所需可选参数。
* @extends {MapV.BaseLayer}
*
*/
export class MapvRenderer extends BaseLayer {
constructor(map, layer, dataSet, options) {
super(map, dataSet, options);
if (!BaseLayer) {
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import {SuperMap} from '../../SuperMap';
import {baiduMapLayer, DataSet} from 'mapv';
import { getMeterPerMapUnit } from '@supermap/iclient-common';
/**
* @class MapVRenderer
* @classdesc MapV渲染器。
* @private
* @extends {mapv.baiduMapLayer}
* @param {SuperMap.Map} map - 待渲染的地图。
* @param {SuperMap.Layer.MapVLayer} layer - 待渲染的图层。
* @param {Mapv.DataSet} dataSet - 待渲染的数据集,数据所属坐标系要求与 map 保持一致。
* @param {Object} options - 渲染的参数。
*/
var MapVBaseLayer = baiduMapLayer ? baiduMapLayer.__proto__ : Function;
export class MapVRenderer extends MapVBaseLayer {
constructor(map, layer, dataSet, options) {
super(map, dataSet, options);
if (!MapVBaseLayer) {
return this;
}
var self = this;
options = options || {};
self.init(options);
self.argCheck(options);
this.canvasLayer = layer;
this.clickEvent = this.clickEvent.bind(this);
this.mousemoveEvent = this.mousemoveEvent.bind(this);