cesium 信息框 infowindow

Posted dog2016

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cesium 信息框 infowindow相关的知识,希望对你有一定的参考价值。

技术图片

 

 

if (pick.id.name === _entityNames.dikuai) {
                        content = ‘<div>‘ + entityDatainfo.title_num + ‘</div><table ><tbody>‘;
                        content += ‘<tr><td>‘ + entityDatainfo.land_location + ‘  ‘ + entityDatainfo.qu_yu +  ‘  ‘ + entityDatainfo.huanxian + ‘</td></tr>‘;
                        content += ‘<tr><td>‘ + entityDatainfo.yongtu_xiuzheng + ‘  ‘ + entityDatainfo.changdi_xianzhuang + ‘</td></tr>‘;
                        content += ‘<tr><td>公告时间  ‘ + entityDatainfo.bulletin_time + ‘</td></tr>‘;
                    }else if(pick.id.name === _entityNames.loupan){
                        content = ‘<div>‘ + entityDatainfo.pro_name + ‘</div><table ><tbody>‘;
                        content += ‘<tr><td>‘ + (entityDatainfo.plate?entityDatainfo.plate:‘‘) + ‘  ‘ + (entityDatainfo.huanxian?entityDatainfo.huanxian:‘‘) +  ‘  ‘ + (entityDatainfo.district?entityDatainfo.district:‘‘) + ‘</td></tr>‘;
                        content += ‘<tr><td>‘ + ‘  ‘ + entityDatainfo.kaifashang + ‘</td></tr>‘;
                        if (entityDatainfo.huxing2 && entityDatainfo.fangwu_yongtu2) {
                            content += ‘<tr><td>‘ + entityDatainfo.fangwu_yongtu2 + ‘</td></tr>‘;
                            content += ‘<tr><td>‘ + entityDatainfo.huxing2 + ‘</td></tr>‘;
                        }
                    }

  

 

/**
 * 加载3Dtiles
 */
function addTileSet() {
    let url=‘./data/tileset/gaoxin2/tileset.json‘;
    var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
        url : url
    }));
    tileset.name=_entityNames.dikuai;
    tileset.style = new Cesium.Cesium3DTileStyle({
        color : {
            conditions : [
                /*[‘${Height} >= 100‘, ‘color("purple", 0.5)‘],
                [‘${Height} >= 50‘, ‘color("red")‘],*/
                [‘${louceng} <= 3‘, ‘color("#87CEFA")‘],
                [‘true‘, ‘color("grey")‘],
            ]
        },
        show : ‘1 > 0‘,
        meta : {
            description : ‘"Building id ${id} has height ${Height}."‘
        }
    });
    tileset.readyPromise.then(function(tileset) {
        // tile.properties is not defined until readyPromise resolves.
        var properties = tileset.properties;
        if (Cesium.defined(properties)) {
            for (var name in properties) {
                console.log(properties[name]);
            }
        }
    });
}

  

以上是关于cesium 信息框 infowindow的主要内容,如果未能解决你的问题,请参考以下文章

InfoWindow中的Android Google地图摘要自动更新

GMSMarker 信息窗口内容(片段)未更新

谷歌地图集群不会分隔彼此靠近的标记以供 infoWindow 显示信息

如何设置百度地图infowindow的位置

谷歌地图infowindow关闭不工作

标记点击;用户将自定义信息添加到 infoWindow