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

免费快速建站工具新浪云怎么做淘宝客网站

免费快速建站工具,新浪云怎么做淘宝客网站,网站登录页面html模板,亚马逊备案网站建设Vue.js2Cesium1.103.0 七、Primitive 绘制航线元素 用 Primitive 绘制航线元素,包括航点图标,航线线段,线段距离标注,航点序号,海拔标注,总航程等信息。 可同时绘制多条航线;可根据 id 清除指…

Vue.js2+Cesium1.103.0 七、Primitive 绘制航线元素

用 Primitive 绘制航线元素,包括航点图标,航线线段,线段距离标注,航点序号,海拔标注,总航程等信息。

  • 可同时绘制多条航线;
  • 可根据 id 清除指定的某条航线;
  • 设置航点图标;
  • 设置航线颜色;
  • 绘制时可同时将视角跳转到航线所在位置处。

Demo

<template><div style="width: 100%; height: 100%;"><div id="cesium-container" style="width: 100%; height: 100%;" /><div class="ul"><div v-for="(item, index) of list" :key="index" class="li":class="{ active: checkedList.findIndex(_ => _.id === item.id) > -1 }" @click="handleClick(item, index)">{{ item.name }}</div></div></div>
</template>
<script>
/* eslint-disable no-undef */
import {AddRouteGraphic,ClearRouteGraphic
} from '@/utils/CesiumUtils/DrawRoute'
export default {data() {return {colors: ['#D0021B', '#F8E71C', '#7ED321', '#4A90E2', '#BD10E0'],active: '',checkedList: [],list: []}},computed: {},watch: {},mounted() {window.$InitMap()this.list = require('./routes.json')viewer.camera.flyTo({destination: Cesium.Rectangle.fromDegrees(117.70714705967534, 39.074587204563336, 117.72382214389826, 39.08476744905917)})},methods: {handleClick(item, index) {if (this.checkedList.findIndex(_ => _.id === item.id) === -1) {this.checkedList.push(item)} else {const spliceIndex = this.checkedList.findIndex(_ => _.id === item.id)this.checkedList.splice(spliceIndex, 1)}for (let index = 0; index < this.list.length; index++) {const element = this.list[index]ClearRouteGraphic('Route' + element.id)}for (let index = 0; index < this.checkedList.length; index++) {const element = this.checkedList[index]AddRouteGraphic({id: 'Route' + element.id, // 航线所有元素 ID 前缀(用于多处绘制/清除航线)list: element.list, // 航点数据wayPointImage: require('@/assets/images/waypoint.png'), // 航点图标indexReverse: false, // 序号翻转// color: '#ff0000',color: this.colors[index], // 航线,航点颜色lineVisible: true, // 航线pointVisible: true, // 航点altitudeVisible: true, // 海拔distanceVisible: true, // 线段距离planeTimeVisible: true, // 预计飞行时间fly: true // 是否定位到航线处})}}}
}
</script>
<style lang="scss" scoped>
.ul {position: fixed;right: 50px;top: 100px;.li {padding: 10px 0;cursor: pointer;color: #fff;&.active {color: red;}}
}
</style>
http://www.yayakq.cn/news/144367/

相关文章:

  • 中山比好的做网站的公司网站群管理
  • 婴幼儿用品网站开发意义产品介绍页面的制作 html
  • 深圳建设企业网站免费网站开发
  • 无锡企业网站排名WordPress 布局 企业网站
  • 泉州网站制作企业定期更新网站
  • 个人微信网站建设网站这么做优化
  • 网站有哪些功能购买服务器做网站
  • 代做设计网站好云梦做网站
  • 深圳网站建设公司制作定制wordpress english
  • 做网站公司运营部怎么建设微信网站
  • 新的网站建设技术方案宁波网站建设营销推广
  • 免费网站代理国内国际新闻
  • 汕头模版网站建设智能网站建设设计
  • 网站建设情况自查报告文章页模板wordpress
  • 建站之星做网站海报设计用什么软件好
  • 网站建设的最终目标漳州专业网站建设
  • 建立网站的是什么人招聘网站企业招聘怎么做
  • 网站升级改版的目的前端前景怎么样
  • 国内做网站比较好的公司有哪些购物网站建设存在的问题
  • 杭州企业推广网站石家庄自助建站模板
  • 网站建设销售人员培训教程html编辑器软件
  • 上海外贸建站推广公司营销网站的方法
  • 建设网站的分析网站制作与管理技术标准实训教程
  • 广东网站建设公司报价天津建设工程信息网 塘沽一中
  • 潍坊市房屋和城乡建设局网站网页打不开视频播放不了是什么问题
  • 不用服务器怎么做网站怎样查企业注册信息查询
  • 网站怎么做百度认证十大旅游电子商务网站
  • 广东网站制作平台wordpress 别名插件
  • 双语企业网站app开发公司哪家比较好
  • 北京 网站设计飞沐js网站源码下载