cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
54 lines (53 loc) • 1.51 kB
JavaScript
import "../../../../echarts/lib/echarts.mjs";
import componentPostEffectMixin from "../common/componentPostEffectMixin.mjs";
import componentLightMixin from "../common/componentLightMixin.mjs";
import ComponentModel from "../../../../echarts/lib/model/Component.mjs";
import { merge } from "../../../../zrender/lib/core/util.mjs";
var MAPBOX_CAMERA_OPTION = ["zoom", "center", "pitch", "bearing"];
var Mapbox3DModel = ComponentModel.extend({
type: "mapbox3D",
layoutMode: "box",
coordinateSystem: null,
defaultOption: {
zlevel: -10,
style: "mapbox://styles/mapbox/light-v9",
center: [0, 0],
zoom: 0,
pitch: 0,
bearing: 0,
light: {
main: {
alpha: 20,
beta: 30
}
},
altitudeScale: 1,
boxHeight: "auto"
},
getMapboxCameraOption: function() {
var self = this;
return MAPBOX_CAMERA_OPTION.reduce(function(obj, key) {
obj[key] = self.get(key);
return obj;
}, {});
},
setMapboxCameraOption: function(option) {
if (option != null) {
MAPBOX_CAMERA_OPTION.forEach(function(key) {
if (option[key] != null) {
this.option[key] = option[key];
}
}, this);
}
},
getMapbox: function() {
return this._mapbox;
},
setMapbox: function(mapbox) {
this._mapbox = mapbox;
}
});
merge(Mapbox3DModel.prototype, componentPostEffectMixin);
merge(Mapbox3DModel.prototype, componentLightMixin);
var Mapbox3DModel$1 = Mapbox3DModel;
export { Mapbox3DModel$1 as default };