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

宜昌seo优化服务深圳seo优化seo优化

宜昌seo优化服务,深圳seo优化seo优化,传奇手游发布网站,易语言可以做网站么Vue.js2Cesium1.103.0 六、标绘与测量 点,线,面的绘制,可实时编辑图形,点击折线或多边形边的中心点,可进行添加线段移动顶点位置等操作,并同时计算出点的经纬度,折线的距离和多边形的面积。 De…

Vue.js2+Cesium1.103.0 六、标绘与测量

点,线,面的绘制,可实时编辑图形,点击折线或多边形边的中心点,可进行添加线段移动顶点位置等操作,并同时计算出点的经纬度,折线的距离和多边形的面积。

Demo

import PlotUtil from '@/utils/CesiumUtils/Plot/index.js'
export default {data () {return {plottingStatus: false,plotData: {},$PlotUtil: null,active: '',btns: [{name: 'point'},{name: 'polyline'},{name: 'polygon'}// {//   name: 'text'// }]}},methods: {handleSave() {this.addGraphic(this.plotData)this.$PlotUtil.Destory()},addGraphic(data) {const _color = new Cesium.Color.fromCssColorString('#17E980')if (data.drawingMode === 'point') {viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(data.centerPoint.longitude, data.centerPoint.latitude, data.centerPoint.altitude),point: {color: _color,// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,// distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 30000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 1.0, 0.7e4, 0.8),pixelSize: 14,outlineWidth: 2,outlineColor: Cesium.Color.fromCssColorString('#fff')},label: {text: `经度:${data.centerPoint.longitude}\n纬度:${data.centerPoint.latitude}\n海拔:${data.centerPoint.altitude}`,font: '30px sans-serif',// pixelOffset: new Cesium.Cartesian2(0.0, 45.0),// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,fillColor: Cesium.Color.fromCssColorString('#fff'),style: Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth: 2,outlineColor: Cesium.Color.fromCssColorString('#000'),disableDepthTestDistance: Number.POSITIVE_INFINITY,// distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 30000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 0.6, 0.7e4, 0.5)}})} else if (data.drawingMode === 'polyline') {viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(data.centerPoint.longitude, data.centerPoint.latitude, data.centerPoint.altitude),label: {text: `${data.activeShapeComputed}m`,font: '30px sans-serif',// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,fillColor: Cesium.Color.fromCssColorString('#fff'),style: Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth: 2,outlineColor: Cesium.Color.fromCssColorString('#000'),disableDepthTestDistance: Number.POSITIVE_INFINITY,// distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 30000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 0.6, 0.7e4, 0.5)}})if (data.activeSubLine && data.activeSubLine.length > 0) {data.activeSubLine.map((line, lineIndex) => {if (line.distance <= 0) returnconst positions = Cesium.Cartesian3.fromDegreesArrayHeights([line.start.longitude, line.start.latitude, line.start.altitude,line.end.longitude, line.end.latitude, line.end.altitude])viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(line.centerPoint.longitude, line.centerPoint.latitude, line.centerPoint.altitude),polyline: {// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,positions: positions,material: _color,depthFailMaterial: new Cesium.PolylineDashMaterialProperty({_color}),width: 5},label: {text: `${line.distance}`,font: '30px sans-serif',fillColor: Cesium.Color.fromCssColorString('#fff'),style: Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth: 2,outlineColor: Cesium.Color.fromCssColorString('#000'),disableDepthTestDistance: Number.POSITIVE_INFINITY,// distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 30000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 0.6, 0.7e4, 0.5)}})})}} else if (data.drawingMode === 'polygon') {const vertices = data.verticesPosition || data.activeShapePoints || []const _hierarchy = []if (vertices.length > 0) {vertices.map(point => {_hierarchy.push(Cesium.Cartesian3.fromDegrees(point.longitude,point.latitude,point.altitude))})}if (_hierarchy.length > 0) {const dynamicPositions = new Cesium.CallbackProperty(function () {return new Cesium.PolygonHierarchy(_hierarchy)}, false) // 使贴地多边形在模型上有立体效果const center = data.centerPointconst altitudes = vertices.map(_ => _.altitude)const max = altitudes.sort()[altitudes.length - 1]center.altitude = maxviewer.entities.add({position: Cesium.Cartesian3.fromDegrees(data.centerPoint.longitude, data.centerPoint.latitude, data.centerPoint.altitude),polygon: {// hierarchy: hierarchy,hierarchy: dynamicPositions,// extrudedHeight: 200,// perPositionHeight: true,// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,material: new Cesium.ColorMaterialProperty(_color)},label: {text: `${data.activeShapeComputed}平方米`,font: '30px sans-serif',fillColor: Cesium.Color.fromCssColorString('#fff'),style: Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth: 2,outlineColor: Cesium.Color.fromCssColorString('#000'),disableDepthTestDistance: Number.POSITIVE_INFINITY,// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,// eyeOffset: new Cesium.Cartesian3(0, 0, -10000),// distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 10000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 0.6, 0.7e4, 0.5)}})}} else if (data.drawingMode === 'text') {viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(data.centerPoint.longitude, data.centerPoint.latitude, data.centerPoint.altitude),label: {text: text,font: _font,fillColor: _color,disableDepthTestDistance: Number.POSITIVE_INFINITY,distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.0, 30000.0),scaleByDistance: new Cesium.NearFarScalar(1.0e2, 0.6, 0.7e4, 0.5),show: visible}})}},initPlotUtil() {const _this = thisthis.$PlotUtil = new PlotUtil({defaultColorValue: '#17E980',PlottingStatus: function (value) {_this.plottingStatus = valueconsole.log('..................PlottingStatus', value)},Finish: function (data) {console.log('..................Finish', data)_this.plotData = data},VerticesFinish: function (data) {console.log('..................VerticesFinish', data)},CurrentEditVertice: function (data) {console.log('..................CurrentEditVertice', data)}})},handleClick (item) {this.active =this.active === item.name? (this.active = ''): (this.active = item.name)if (this.active) {this.$PlotUtil.StartPlot(this.active)} else {this.$PlotUtil.Destory()}}}
}
      <div class="ul"><div v-for="(item, index) of btns" :key="index" class="li" :class="{ active: item.name === active }"@click="handleClick(item)">{{ item.name }}</div><div class="li" :class="{ disabled: plottingStatus }" @click="handleSave">保存</div></div>
http://www.zhongyajixie.com/news/13004.html

相关文章:

  • 搜索引擎技巧优化大师官方免费下载
  • 怎样提高网站访问速度高端网站建设的公司
  • 蒙城做网站的公司seo优化包括哪些内容
  • 如何做自己的播报网站搜索引擎排名营销
  • 网站建设咋打开自己网站主页网址码迷seo
  • 网站开发技术发展史徐州百度推广公司
  • 网上接效果图平台什么是网站seo
  • 网站建设公司哪个好呀金融网站建设爱站工具包官网
  • 网站使用协议书学技术包分配的培训机构
  • 品牌网站建设的意义西安网红
  • 网站设计策划案app营销策略有哪些
  • 做网站找个人还是公司发外链的网址
  • 品牌网站建设c股j东大蝌蚪企业如何网络推广
  • 小程序排行榜南昌seo排名优化
  • 新闻网站建设概述百度推广业务电话
  • 网站怎么做下载功能网站搭建步骤
  • 网站设计制作公司推荐微博搜索引擎优化
  • 天猫店铺入驻流程企业seo推广
  • 单页网站内链接aso优化运营
  • 搭建免费网站无忧seo
  • 免费空间能放网站吗app推广
  • h5网站开发下载百度app最新版到桌面
  • 个人网站的设计及实现免费网页模板网站
  • 公司微信网站开发平台手机推广软文
  • 淘宝客怎么做直播网站收录网站的平台有哪些
  • 长沙3合1网站建设价格网络舆情的网站
  • vs做的小型网站例深圳创新创业大赛
  • 计算机前端郑州抖音seo
  • 做教案找资料有哪些网站疫情防控最新信息
  • 线上网站开发系统流程搜索自媒体平台