ID:34997914
大小:522.72 KB
页数:54页
时间:2019-03-15
4、ec(buildid,floors[0],function(jsondata){//获取其中一个楼层的信息//在这里根据jsondata添加图层信息});});添加图层,在上面的地图数据返回后就可以添加图层//设置样式varstyle={Room_Common:{//房间公共样式"color":"#544f54","weight":0.5,"opacity":1,"fillColor":"#f4e9df","fillOpacity":1,"lineCap":null,"lineJoin":null,"clickable":true,"radius":0.8,"className"
5、:"nofastclick","dashArray":0},room_unbooked:{//取消选中样式"color":"#544f54","fillColor":"#f4e9df",},room_booked:{"color":"#544f54","fillColor":"#ffbb8d",},Floor:{//楼层样式"color":"#544f54","weight":3,"opacity":1,"fillColor":"#f4f4f4",3GettingStarted"fillOpacity":1,"lineCap":null,"lineJoin":null,"clic
6、kable":true,"radius":0.8,"dashArray":0}}//添加图层dataSource.exec(function(jsondata){//只传一个function表示获取所有地上一层的图形数据layers.collision=UMap.layerGroup.collision({margin:1,justShow:hotel_keys});//碰撞检测层,用于自适应显示房间门、房间号、酒店标签。正常情况下,越先添加进来的label权重越高addLayers(jsondata);onDataReady();})varonDataReady=functio
7、n(bool){for(vari=0;i
此文档下载收益归作者所有