godlike

第 4 位会员

会员
个人信息
  • 加入于 2018-06-23 14:38:56
  • 最后登录时间 16天前
个人成就
  • 发表文章次数 168
  • 发布回复次数 89
  • 个人主页浏览次数 200
大家有在cesium上用体绘制方法实现这种效果的吗2年前

是的, 我现在就想把netcdf的格网点数据渲染成这种效果,是一层层的格网点, 要单独写顶点着色器和片段着色器进行坐标转换和插值,配图是文献里面的,现在自己也想实现,改进一下不知道哪位大神可以实现

cesium 三维建筑如何加载2年前

var tileset = new Cesium.Cesium3DTileset({ url: Cesium.IonResource.fromAssetId(3839) });
viewer.scene.primitives.add(tileset);

这个URL对应的资源是啥意思 如果要自己做该怎么做

Cesium如何加载样例中的飞机,并且随机模拟飞行?2年前

举个例子:

// camera fly
var forward = 0;
var path_length = [1320, 200, 200, 200, 300]
var path_angle = [0.39269908125, 0.78539816339744830961566084581988, 0.78539816339744830961566084581988, 1.5707963267948966192313216916398]
var path_dir = ['u', 'r', 'r', 'r'];
var path_speed = [10, 5, 4, 2, 2];
var path_i = 0;
var fly_handler = null;
function freeFly(){
    viewer.camera.moveForward(path_speed[path_i]);
    forward += path_speed[path_i];
    if (forward >= path_length[path_i]) {    
        if (path_i + 1 >= path_length.length) {
            path_i = 0;
            viewer.zoomTo(tileset, default_HeadingPitchRange);
            return;
        }
        forward = 0;
        if (path_dir[path_i] == 'u')         
        	viewer.camera.lookUp(path_angle[path_i]);
        if (path_dir[path_i] == 'r')         
        	viewer.camera.lookRight(path_angle[path_i]);
        path_i++;
    }
}
function startToFly() {
	require(["Cesium"],function(Cesium){
		fly_handler = setInterval(freeFly, 100);
	});  	
}

Openlayers中的平移、缩放事件回调2年前

在Openlyaers 4.0中,可以通过以下方式对地图map对象的几个特定事件绑定自定义函数。 来自官网的例子:http://openlayers.org/en/latest/examples/moveend.html

function onMoveEnd(evt) {
        const map = evt.map;
        const extent = map.getView().calculateExtent(map.getSize());
        const bottomLeft = toLonLat(getBottomLeft(extent));
        const topRight = toLonLat(getTopRight(extent));
        display('left', wrapLon(bottomLeft[0]));
        display('bottom', bottomLeft[1]);
        display('right', wrapLon(topRight[0]));
        display('top', topRight[1]);
		// TODO: your code...
      }

      map.on('moveend', onMoveEnd);

支持的事件是:

click (module:ol/MapBrowserEvent~MapBrowserEvent) - A click with no dragging. A double click will fire two of this.
dblclick (module:ol/MapBrowserEvent~MapBrowserEvent) - A true double click, with no dragging.
moveend (module:ol/MapEvent~MapEvent) - Triggered after the map is moved.
movestart (module:ol/MapEvent~MapEvent) - Triggered when the map starts moving.
pointerdrag (module:ol/MapBrowserEvent~MapBrowserEvent) - Triggered when a pointer is dragged.
pointermove (module:ol/MapBrowserEvent~MapBrowserEvent) - Triggered when a pointer is moved. Note that on touch devices this is triggered when the map is panned, so is not the same as mousemove.
postcompose (module:ol/render/Event~RenderEvent)
postrender (module:ol/MapEvent~MapEvent) - Triggered after a map frame is rendered.
precompose (module:ol/render/Event~RenderEvent)
propertychange (module:ol/Object~ObjectEvent) - Triggered when a property is changed.
singleclick (module:ol/MapBrowserEvent~MapBrowserEvent) - A true single click with no dragging and no double click. Note that this event is delayed by 250 ms to ensure that it is not a double click.

Your Site Analytics