![b6a3a4e606704c5004da08cfad16b6aa.png](https://i-blog.csdnimg.cn/blog_migrate/5fb2a0de56c22b49930ccc4f5c6b0d2f.jpeg)
Cesium 50个实例 鹰眼图实现原理
引用库
通过引用leaflet来实现而二维地图加载部分、Cesium来实现三维部分。
基本原理
核心原理是通过addEventListener来获取 Cesium Camera 的窗口信息、来实时更新leaflet位置。核心源码RenderHandler函数 如下:
sceneRenderHandler: function (e) {
var ext = getExtent(this.viewer),
i = L.latLng(ext.ymin, ext.xmin),
s = L.latLng(ext.ymax, ext.xmax),
bounds = L.latLngBounds(i, s);
if (this.rectangle ? this.rectangle.setBounds(bounds) : this.rectangle = L.rectangle(bounds, this.showStyle).addTo(this.map), -180 == ext.xmin && 180 == ext.xmax && 90 == ext.ymax && -90 =