function ciy_chart_farm1_bg_cemap(opdata) { this.func = ['farm_cemap1']; this.lastdata = {}; this.resize = function () { } this.setdata = function (funame, data) { if (!data) return; this.lastdata[funame] = data; if (thos.ce) return; thos.ce = new ciyearth(); var mapset = ciyfn.tojson(data.cemap.mapjson) || {}; mapset.domid = 'ceContainer'; mapset.personheight = 1.8; mapset.flys = mapset.flys || []; if (mapset.flys.length == 0) { var height = 2000.0; var position = Cesium.Cartesian3.fromDegrees(tofloat(data.base.lng), tofloat(data.base.lat), height); mapset.flys.push({ name: '俯视', dat: JSON.stringify({ fd: position, fo: { h: Cesium.Math.toRadians(0.0), p: Cesium.Math.toRadians(-90.0), r: 0.0 } }) }); } thos.ce.init(mapset); for (var i = 0; i < mapset.flys.length; i++) { var html = $5('
' + thos.ce.viewer.flags.speedbet + '';
htmltip += ' ';
$5('.cecontrolpanel').html(htmltip);
} else {
$5('.cecontrolpanel').html('');
}
}
};
}
this.distory = function (data) {
if (thos.ce)
thos.ce.destroy();
thos.ce = null;
}
var thos = this;
this.ce = null;
this.resize();
opdata.container.append(`
`);
}