当前位置: 首页 > news >正文

网站怎么做才 吸引人自己制作电视直播app

网站怎么做才 吸引人,自己制作电视直播app,微商城网站建设资讯,网站注册页面模板下载场景解决方案实现方案index.vue方案解决效果 场景 ceisum中Entity实例的生成和销毁#xff0c;大部分逻辑和vue代码分离#xff0c;导致不好阅读和维护 解决方案 ceisum 中实例 Entity 的生命周期#xff0c;和vue的生命周期’相似’#xff0c;把两个生命周期结合(把en… 场景解决方案实现方案index.vue方案解决效果 场景 ceisum中Entity实例的生成和销毁大部分逻辑和vue代码分离导致不好阅读和维护 解决方案 ceisum 中实例 Entity 的生命周期和vue的生命周期’相似’把两个生命周期结合(把entity封装为vue组件) 实现方案 vue中 template 中内容可以放置 弹框的内容通过ceisum 获取屏幕坐标进行渲染通过代码逻辑使 vue组件的 mounted 和 beforeDestroy 来和 entity 实例的生成 add和销毁destroy 相关联通过 Cesium.ScreenSpaceEventHandler 关联vue组件的方法实现交互 index.vue 采用原生cesium 实现entity的弹窗并封装为vue组件 !--/*** author: liuk* date: 2023/8/10* describe: 小区视角* email:1229223630qq.com */-- templatedivdiv classheat-info v-ifshowPopup :style{top:popupPos.top,left:popupPos.left}div classname小区/div{{showPopup}}div classbottom_divdivdiv classnum20.3nbsp;span℃/span/divdiv stylemargin-top: 6px;均温/div/divdivdiv classnum92.9nbsp;span%/span/divdiv stylemargin-top: 6px;室温/div/div/div/div/div /templatescript import communityList from ../data/community.jsonlet heatDatasource, preSelEntity,handler export default {data(){return {showPopup: false,popupPos: {left: 0,top: 0},}},methods:{addEntity() {let features communityList.features || [];features.forEach(el {let pos Cesium.Cartesian3.fromDegreesArray(el.geometry.coordinates[0].map(el1 {return el1.join(,)}).join(,).split(,).map(Number));let boundingSphere new Cesium.BoundingSphere.fromPoints(pos);let center boundingSphere.center;heatDatasource.entities.add({position: center,customType: communityEntity,label: {text: el.properties.name,disableDepthTestDistance: Number.POSITIVE_INFINITY,horizontalOrigin: Cesium.HorizontalOrigin.Top,scaleByDistance: new Cesium.NearFarScalar(2000, 1, 500000, 0.1)},show: true,polygon: {hierarchy: new Cesium.PolygonHierarchy(pos),heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,material: Cesium.Color.fromCssColorString(white).withAlpha(0),},polyline: {show: true,positions: pos,width:1.5,material: Cesium.Color.fromCssColorString(#C0C0C0).withAlpha(0.5),heightReference: Cesium.HeightReference.CLAMP_TO_GROUND}});})},onMouseClick(movement){var preSelEntity window.dasViewer.scene.pick(movement.position);if (!Cesium.defined(preSelEntity) || !Cesium.defined(preSelEntity.id)) return;var entity preSelEntity.id;if (!(entity instanceof Cesium.Entity) || entity.customType ! communityEntity) return;window.dasViewer.camera.flyTo({destination: Cesium.Rectangle.fromCartesianArray(entity.polygon.hierarchy.getValue().positions),complete: () {this.$emit(hideCommunityEntity)}});},onMouseMove(movement){var pickedObject window.dasViewer.scene.pick(movement.endPosition);if (!Cesium.defined(pickedObject) || !Cesium.defined(pickedObject.id)) {this.resetSelectedEntity();return;}var entity pickedObject.id;if (!(entity instanceof Cesium.Entity) || entity.customType ! communityEntity) {this.resetSelectedEntity();return;}if (entity ! preSelEntity) {this.resetSelectedEntity();entity.polygon.material Cesium.Color.fromCssColorString(white).withAlpha(0.1);entity.polyline.material Cesium.Color.fromCssColorString(white).withAlpha(1);}preSelEntity entity;this.showPopupBox(movement.endPosition);},onMouseLeave(){this.showPopup false},resetSelectedEntity(){if (preSelEntity) {this.showPopup falsepreSelEntity.polygon.material Cesium.Color.fromCssColorString(white).withAlpha(0);preSelEntity.polyline.material Cesium.Color.fromCssColorString(#C0C0C0).withAlpha(0.5);preSelEntity null;}},showPopupBox(movement){this.showPopup truethis.popupPos.left ${movement.x 10}px;this.popupPos.top ${movement.y 10}px;}},mounted(){const self thisheatDatasource new Cesium.CustomDataSource(community);window.dasViewer.dataSources.add(heatDatasource);this.addEntity()handler new Cesium.ScreenSpaceEventHandler(window.dasViewer.scene.canvas);handler.setInputAction(self.onMouseClick, Cesium.ScreenSpaceEventType.LEFT_CLICK);handler.setInputAction(self.onMouseMove, Cesium.ScreenSpaceEventType.MOUSE_MOVE);handler.setInputAction(self.onMouseLeave, Cesium.ScreenSpaceEventType.MOUSE_LEAVE);},beforeDestroy() {handler.destroy()window.dasViewer.dataSources.remove(heatDatasource);} } /scriptstyle langless scoped .heat-info {position: absolute;width: 196px;min-height: 124px;padding: 12px;border: 1px solid rgba(85, 85, 85, 1);box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);border-radius: 4px;background-color: rgba(0, 0, 0, 0.8);color: #fff;z-index: 9999;pointer-events: none;.name {font-family: PingFangSC-Medium;font-size: 16px;color: #FFFFFF;letter-spacing: 0;font-weight: 500;margin-top: 5px;}.bottom_div {display: flex;position: relative;justify-content: space-between;font-size: 12px;color: #A2A3A3;letter-spacing: 0;font-weight: 400;font-family: PingFangSC-Regular;margin-top: 21px;.num {font-size: 20px;color: #FFFFFF;letter-spacing: 0;line-height: 16px;font-weight: 400;span {font-size: 12px;color: #FFFFFF;letter-spacing: 0;font-weight: 200;color: #A2A3A3;}}} } /style方案解决效果
http://www.zqtcl.cn/news/550239/

相关文章:

  • html5网站有哪些网站建设部分费用会计科目
  • 网站域名备案 更改吗深圳新站优化
  • 房产网站门户系统免费网站免费无遮挡
  • 用国外网站 图片做自媒体seo诊断a5
  • 广州市南沙建设局网站优改网logo设计
  • 网站建设亿玛酷知名公司网站首页如何做
  • 教育网站 php网络服务公司
  • net域名做网站怎么样建站公司 转型经验
  • 赣州网站建设哪家公司好上海市建设安全协会网站
  • 网站排名优化软件有哪些西宁网站建设官网
  • 支付宝手机网站签约迪庆公司网站开发方法
  • 唐山网站关键词优化网站开发公司推荐
  • 福建响应式网站制作市工商局网站建设情况
  • 深圳网站运营托管罗伯特清崎说的网络营销是什么
  • 太仓市质监站网址百度关键字推广费用
  • 为您打造高端品牌网站pageadmin wordpress
  • 中小型网站建设的基本流程简约网站欣赏
  • 设备上哪个网站做外贸推广网络服务类型及其所采用的网络协议
  • 学习前端开发的网站动漫设计属于什么大类
  • 十堰秦楚网 十堰新闻门户网站报修网站模板
  • 家居小程序源码下载自动seo系统
  • 动态效果的网站建设技术老闵行是指哪里
  • 电商网站开发面临的技术问题做闪图的网站
  • 怎么查看网站开发语言的类型东莞哪些地方是风险区
  • 不用购买域名做网站广州网站建设培训学校
  • 城市轨道建设规范下载网站古网站典模板
  • 关于实验室建设的英文网站深圳企业网站制作公司怎样
  • wordpress全站背景音乐中山网站搜索排名
  • 搭建网站的过程透明主题wordpress
  • 丰台网站建设公司电话深圳微信商城网站设计公司