Monthly Archives: July 2017

Left hand panel for Cesiumjs.


»
$(function(){
	$('.slider-arrow').click(function(){
        if($(this).hasClass('show')){
	    $( ".slider-arrow, .panel" ).animate({
          left: "+=300"
		  }, 700, function() {
            // Animation complete.
          });
		  $(this).html('«').removeClass('show').addClass('hide');
        }
        else {   	
	    $( ".slider-arrow, .panel" ).animate({
          left: "-=300"
		  }, 700, function() {
            // Animation complete.
          });
		  $(this).html('»').removeClass('hide').addClass('show');    
        }
    });

});
.panel {
	width:300px;
	float:left;
	height:550px;
	background:#d9dada;
	position:relative;
	left:-300px;

}
.slider-arrow {
	padding:5px;
	width:10px;
	float:left;
	background:#d9dada;
	font:400 12px Arial, Helvetica, sans-serif;
	color:#000;
	text-decoration:none;
	position:relative;
	left:-300px;
}

https://jsfiddle.net/phpmind/2gj84235/

Share

Displaying dynamic CZML data?

var czml = [{
    "id" : "document",
    "name" : "CZML Model",
    "version" : "1.0"
}, {
    "id" : "aircraft model",
    "name" : "Cesium Air",
    "position" : {
        "cartographicDegrees" : [-77, 37, 10000]
    },
    "model": {
        "gltf" : "../../SampleData/models/CesiumAir/Cesium_Air.glb",
        "scale" : 2.0,
        "minimumPixelSize": 128
    }
}];


var updatedCzml = [{
    "id":"document",
    "name":"CZML Model",
    "version":"1.0"
},{
    "id":"aircraft model",
    "position": {
        "cartographicDegrees":
        [-139.23640674352512,24.89787519772953,48897.796695947756]
    }
}];



var czmlStream = new Cesium.CzmlDataSource();


var viewer = new Cesium.Viewer('cesiumContainer', {
        infoBox : false,
        selectionIndicator : false,
        shadows : true,
        automaticallyTrackDataSourceClocks : false
});

viewer.dataSources.add(czmlStream.load(czml));


Sandcastle.addToolbarButton('Process', function() {
    czmlStream.process(updatedCzml);


});


https://www.html5rocks.com/en/tutorials/eventsource/basics/#toc-security

https://www.howopensource.com/2014/12/introduction-to-server-sent-events/

Source – Hannah Pinkos

Share