1.CSS样式
<style type="text/css">
* {
margin: 0px;
padding: 0px;
}
html,body,#cesiumContainer {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
/*自定义气泡弹窗*/
/*leaflet风格气泡窗口样式模板*/
.trackPopUp {
display: none;
color: rgb(255, 255, 255);
height: 50px;
}
.leaflet-popup {
position: absolute;
}
.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
padding: 4px 4px 0 0;
text-align: center;
font: 25px/25px Tahoma, Verdana, sans-serif;
color: rgb(255, 255, 255);
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-button {
padding: 10px 10px 10px 10px;
margin: 0 4px 0 4px;
text-align: center;
font: 12px/12px Tahoma, Verdana, sans-serif;
color: rgb(255, 255, 255);
text-decoration: none;
font-weight: bold;
background-color: #000000;
}
#Btns {
margin-top: 10px;
width: 100%;
text-align: center;
}
.leaflet-popup-content-wrapper {
max-height: 220px;
overflow-y: auto;
height: 180px;
padding: 1px;
text-align: left;
border-radius: 12px;
font-size: 12px;
background-image: url('../image/popbackground.png');
background-repeat: repeat-x;
}
.leaflet-popup-content {
margin: 5px 20px;
line-height: 1.4;
}
.leaflet-popup-content div{
text-align: center;
}
.leaflet-popup-content div {
font-size: 12px;
}
.leaflet-popup-content table {
margin-top: 15px;
}
.leaflet-popup-content table tr {
height: 25px;
}
/*自定义气泡弹窗END*/
2.类方法
//设置鼠标点击事件
Ning.MouseClick = function() {
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);