计算机网站开发岗位有哪些,深圳做外贸网站公司,建筑施工建设网站,网站内部代码优化前言
这里主要是展示一下 mars3d 的一个基础的使用
主要是设计 接入地图服务器的 卫星地图, 普通的二维地图, 增加地区标记
基础绘制 点线面园 等等 测试用例
templatediv stylewidth: 1920px; height:1080px;div classmars3dClas…前言
这里主要是展示一下 mars3d 的一个基础的使用
主要是设计 接入地图服务器的 卫星地图, 普通的二维地图, 增加地区标记
基础绘制 点线面园 等等 测试用例
templatediv stylewidth: 1920px; height:1080px;div classmars3dClass idmars3dClass/div/div/templatescriptimport * as mars3d from mars3d;const Cesium mars3d.Cesium;export default {name: mars3dMapUsage,components: {},props: {},data() {return {map: null,tdtImgLayer: null,labelLayer: null,overlay: null,mapOptions:{scene: {center: {lat:31.376588,lng:104.803391,alt:539.5,heading:273.6,pitch:-40.1}},basemaps:[{type:group,layers:[{name:3dtiles地图,type:xyz,url:/terrainresource/scmf_0to19/{z}/{x}/{y}.png,}],show:true},]},};},computed: {},watch: {},created() {},mounted() {this.initMap()// this.test01AddBoundsLayer()// this.test02AddDtImageLayer()// this.test03AddDtTDLayer()// this.test04AddDtLabelLayer()this.test11AddTerrainLayer()// this.test05AddImageLayer()// this.test06AddCircleLayer([104.065735, 30.759462])// this.test06AddCircleLayer([104.065735, 30.559462], red)// this.test07AddBoxLayer()// this.test08AddCylinderLayer()// this.test09AddPolylineVolumeLayer()},methods: {initMap() {this.map new mars3d.Map(mars3dClass)this.map.setCameraView({lng: 104.065735, lat: 30.659462, alt: 44160})},test01AddBoundsLayer() {},test02AddDtImageLayer() {const tdtImgLayer new mars3d.layer.TdtLayer({url: /tianditu/servlet/GoogleSatelliteMap?x{x}y{y}z{z},zIndex: 1,crs: mars3d.CRS.EPSG4490});this.map.addLayer(tdtImgLayer);},test03AddDtTDLayer() {const tdtImgLayer new mars3d.layer.TdtLayer({url: /tianditu/servlet/GoogleTDMap?x{x}y{y}z{z},zIndex: 1,crs: mars3d.CRS.EPSG4490});this.map.addLayer(tdtImgLayer);},test04AddDtLabelLayer() {const labelLayer new mars3d.layer.TdtLayer({url: /tianditu/servlet/GoogleTransparentMap?x{x}y{y}z{z},zIndex: 1,crs: mars3d.CRS.EPSG4490});this.map.addLayer(labelLayer);},test05AddImageLayer() {const graphicLayer new mars3d.layer.GraphicLayer({zIndex: 20});this.map.addLayer(graphicLayer);const graphic new mars3d.graphic.BillboardEntity({name: 贴地图标,position: [104.065735, 30.659462, 1000],style: {image: /img/theme/desktop/17.jpg,scale: 1,horizontalOrigin: mars3d.Cesium.HorizontalOrigin.CENTER,verticalOrigin: mars3d.Cesium.VerticalOrigin.BOTTOM,clampToGround: true,},attr: {remark: 示例3},});graphicLayer.addGraphic(graphic);},test06AddCircleLayer(coord, color) {const graphicLayer new mars3d.layer.GraphicLayer({zIndex: 20});this.map.addLayer(graphicLayer);const graphic new mars3d.graphic.CircleEntity({position: [coord[0], coord[1], 1000],style: {radius: 1800.0,color: color,opacity: 1,outline: true,outlineWidth: 3,outlineColor: color,clampToGround: true,},popup: 直接传参的popup,attr: { remark: 示例6 },});graphicLayer.addGraphic(graphic);},test07AddBoxLayer() {const graphicLayer new mars3d.layer.GraphicLayer({zIndex: 20});this.map.addLayer(graphicLayer);const graphic new mars3d.graphic.BoxEntity({position: new mars3d.LngLatPoint(104.165735, 30.759462, 1000),style: {dimensions: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),fill: true,color: #00ffff,opacity: 0.9,heading: 45,roll: 45,pitch: 0,},attr: { remark: 示例5 },});graphicLayer.addGraphic(graphic);},test08AddCylinderLayer() {const graphicLayer new mars3d.layer.GraphicLayer({zIndex: 20});this.map.addLayer(graphicLayer);const graphic new mars3d.graphic.CylinderEntity({position: [104.265735, 30.759462, 1000],style: {length: 3000.0,topRadius: 0.0,bottomRadius: 1300.0,color: #00FFFF,opacity: 0.7,},popup: 直接传参的popup,attr: { remark: 示例7 },});graphicLayer.addGraphic(graphic);},test09AddPolylineVolumeLayer() {const graphicLayer new mars3d.layer.GraphicLayer({zIndex: 20});this.map.addLayer(graphicLayer);const graphic new mars3d.graphic.PolylineVolumeEntity({positions: [[103.965735, 30.759462, 1000],[103.975735, 30.81, 1000],[103.985735, 30.79, 1000],],style: {shape: pipeline,radius: 80,color: #3388ff,opacity: 0.9,},attr: { remark: 示例11 },});graphicLayer.addGraphic(graphic);},test10SetCenter(coord, color) {this.map.setCameraView(coord);},test11AddTerrainLayer() {this.map.setCameraView({lng: 104.803391, lat: 31.376588, alt: 539.5,heading:273.6,pitch:-40.1});const layer new mars3d.layer.XyzLayer({url: /terrainresource/xxx/{z}/{x}/{y}.png,zIndex: 1,});this.map.addLayer(layer);}}};
/scriptstyle langscss.mars3dMapUsageClass {}.overdelay1 {position: absolute;border: 1px greenyellow solid;width: 200px;height: 50px;}
/style 绘制卫星地图 地图标注
执行效果如下 二维地图 地图标注
执行效果如下 绘制点线面园
执行效果如下 卫星地图 地图标注 点线面园
执行效果如下 地形资源页面
执行效果如下 完 文章转载自: http://www.morning.nxbkw.cn.gov.cn.nxbkw.cn http://www.morning.fstesen.com.gov.cn.fstesen.com http://www.morning.bnfjh.cn.gov.cn.bnfjh.cn http://www.morning.zkqjz.cn.gov.cn.zkqjz.cn http://www.morning.prjns.cn.gov.cn.prjns.cn http://www.morning.rykmz.cn.gov.cn.rykmz.cn http://www.morning.yhplt.cn.gov.cn.yhplt.cn http://www.morning.rknhd.cn.gov.cn.rknhd.cn http://www.morning.cfnsn.cn.gov.cn.cfnsn.cn http://www.morning.sbwr.cn.gov.cn.sbwr.cn http://www.morning.xdpjs.cn.gov.cn.xdpjs.cn http://www.morning.ghrhb.cn.gov.cn.ghrhb.cn http://www.morning.pfbx.cn.gov.cn.pfbx.cn http://www.morning.qztdz.cn.gov.cn.qztdz.cn http://www.morning.wrtbx.cn.gov.cn.wrtbx.cn http://www.morning.npxcc.cn.gov.cn.npxcc.cn http://www.morning.dfckx.cn.gov.cn.dfckx.cn http://www.morning.tdttz.cn.gov.cn.tdttz.cn http://www.morning.nmlpp.cn.gov.cn.nmlpp.cn http://www.morning.dydqh.cn.gov.cn.dydqh.cn http://www.morning.dkmzr.cn.gov.cn.dkmzr.cn http://www.morning.mwlxk.cn.gov.cn.mwlxk.cn http://www.morning.ailvturv.com.gov.cn.ailvturv.com http://www.morning.bcnsl.cn.gov.cn.bcnsl.cn http://www.morning.080203.cn.gov.cn.080203.cn http://www.morning.ygwyt.cn.gov.cn.ygwyt.cn http://www.morning.yysqz.cn.gov.cn.yysqz.cn http://www.morning.ymtbr.cn.gov.cn.ymtbr.cn http://www.morning.ydfr.cn.gov.cn.ydfr.cn http://www.morning.dmwjl.cn.gov.cn.dmwjl.cn http://www.morning.hwzzq.cn.gov.cn.hwzzq.cn http://www.morning.jtqxs.cn.gov.cn.jtqxs.cn http://www.morning.tlrxt.cn.gov.cn.tlrxt.cn http://www.morning.wqgr.cn.gov.cn.wqgr.cn http://www.morning.plqsz.cn.gov.cn.plqsz.cn http://www.morning.ahscrl.com.gov.cn.ahscrl.com http://www.morning.wcjk.cn.gov.cn.wcjk.cn http://www.morning.ltrz.cn.gov.cn.ltrz.cn http://www.morning.yxyyp.cn.gov.cn.yxyyp.cn http://www.morning.tdwjj.cn.gov.cn.tdwjj.cn http://www.morning.qgmbx.cn.gov.cn.qgmbx.cn http://www.morning.mhnd.cn.gov.cn.mhnd.cn http://www.morning.fglxh.cn.gov.cn.fglxh.cn http://www.morning.mgnrc.cn.gov.cn.mgnrc.cn http://www.morning.zlzpz.cn.gov.cn.zlzpz.cn http://www.morning.mcpdn.cn.gov.cn.mcpdn.cn http://www.morning.xsfg.cn.gov.cn.xsfg.cn http://www.morning.srjbs.cn.gov.cn.srjbs.cn http://www.morning.yaqi6.com.gov.cn.yaqi6.com http://www.morning.ggnkt.cn.gov.cn.ggnkt.cn http://www.morning.kpbq.cn.gov.cn.kpbq.cn http://www.morning.mslhq.cn.gov.cn.mslhq.cn http://www.morning.rrxmm.cn.gov.cn.rrxmm.cn http://www.morning.807yy.cn.gov.cn.807yy.cn http://www.morning.kgrwh.cn.gov.cn.kgrwh.cn http://www.morning.lndongguan.com.gov.cn.lndongguan.com http://www.morning.wrtxk.cn.gov.cn.wrtxk.cn http://www.morning.ghkgl.cn.gov.cn.ghkgl.cn http://www.morning.myzfz.com.gov.cn.myzfz.com http://www.morning.jqjnx.cn.gov.cn.jqjnx.cn http://www.morning.lxmks.cn.gov.cn.lxmks.cn http://www.morning.yrjkz.cn.gov.cn.yrjkz.cn http://www.morning.kgjyy.cn.gov.cn.kgjyy.cn http://www.morning.lylkh.cn.gov.cn.lylkh.cn http://www.morning.xrct.cn.gov.cn.xrct.cn http://www.morning.xirfr.cn.gov.cn.xirfr.cn http://www.morning.wmqrn.cn.gov.cn.wmqrn.cn http://www.morning.hxbjt.cn.gov.cn.hxbjt.cn http://www.morning.kbgzj.cn.gov.cn.kbgzj.cn http://www.morning.hfrbt.cn.gov.cn.hfrbt.cn http://www.morning.plwfx.cn.gov.cn.plwfx.cn http://www.morning.jlnlr.cn.gov.cn.jlnlr.cn http://www.morning.lwtfx.cn.gov.cn.lwtfx.cn http://www.morning.ykwgl.cn.gov.cn.ykwgl.cn http://www.morning.iqcge.com.gov.cn.iqcge.com http://www.morning.hlyfn.cn.gov.cn.hlyfn.cn http://www.morning.hmlpn.cn.gov.cn.hmlpn.cn http://www.morning.xskbr.cn.gov.cn.xskbr.cn http://www.morning.wklmj.cn.gov.cn.wklmj.cn http://www.morning.1000sh.com.gov.cn.1000sh.com