ZIP【Babylon提升】加载wms瓦片地图 4.72KB

a15869177784

资源文件列表:

MapManger.zip 大约有3个文件
  1. MapManger.vue 2.85KB
  2. MapManger/
  3. MapManger/index.ts 7.53KB

资源介绍:

【Babylon提升】加载wms瓦片地图
<template> <canvas class='map-box' id="map"></canvas> </template> <script lang="ts"> import * as BABYLON from 'babylonjs' // debugger import 'babylonjs-loaders' import 'babylonjs-inspector' import MapManger from './MapManger/index.ts' import axios from 'axios'; export default { name: 'HelloWorld', props: { msg: String }, data() { return { manager: undefined } }, async mounted (){ const canvas = document.getElementById("map") // Get the canvas element const engine = new BABYLON.Engine(<HTMLCanvasElement>canvas, true, { disableWebGL2Support: true, stencil: true }, true) // Generate the BABYLON 3D engine engine.enableOfflineSupport = false // 关闭索引数据库 engine.doNotHandleContextLost = true // 关闭对上下文丢失恢复的支持 const scene = new BABYLON.Scene(engine); const camera = new BABYLON.ArcRotateCamera("Camera", -0.8028206668023489, 0.9460847909507382, 18.063850187886946, new BABYLON.Vector3(0.058185758103861104,-0.03608737237544263,0.025743706286165586), scene); camera.attachControl(canvas, true); const light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene); // 循环渲染 engine.runRenderLoop( () => { scene?.render(true, true) }); // 窗口自适应 window.addEventListener("resize", function () { engine.resize(); }); const mapManger = new MapManger([120.16098814531,30.160642363432] , 7) mapManger.createTiled(scene, [120.16098814531,30.160642363432]) // 加载xyz坐标系 const node = new BABYLON.TransformNode('xyzNode') const linex = BABYLON.MeshBuilder.CreateLines( 'axisX', { colors: [ new BABYLON.Color4(1, 0, 0, 1), new BABYLON.Color4(1, 0, 0, 1) ], points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(1000, 0, 0)] }, scene ) const liney = BABYLON.MeshBuilder.CreateLines( 'axisY', { colors: [ new BABYLON.Color4(0, 1, 0, 1), new BABYLON.Color4(0, 1, 0, 1) ], points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1000, 0)] }, scene ) const linez = BABYLON.MeshBuilder.CreateLines( 'axisZ', { colors: [ new BABYLON.Color4(0, 0, 1, 1), new BABYLON.Color4(0, 0, 1, 1) ], points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 0, 1000)] }, scene ) linex.parent = node liney.parent = node linez.parent = node this.test() }, methods: { // 存储 test() { } } } </script> <style lang="stylus" scoped> .map-box width: 100% height: 100% .css-container z-index: 1; .base{ width: 500px; height: 500px; z-index: 1; background-color: #7ec8ff; position: absolute; } .echarts-box { width: 1000px; height: 500px; position: absolute; display: none } </style>
100+评论
captcha
    类型标题大小时间
    ZIPArduino-INA226-程序922.46KB7月前
    ZIP免费源码小插件-查询网站备案代码.zip2.15KB7月前
    ZIP 1.使用scikit-learn(GridSearchCV)进行网格搜索超参数调整(Python代码,包括数据集)52.98MB7月前
    ZIP2.使用scikit-learn和Python进行超参数调整(Python代码,包括数据集)148.73KB7月前
    ZIPMarvell SWdownloader 4.8.8.228.6MB7月前
    ZIP起床战争服务端(来源:B站@73m9)89.98MB7月前
    ZIP《Flask Web应用开发项目实战基于Python和统信UOS》配套源代码16.12MB7月前
    ZIP《Flask Web应用开发项目实战基于Python和统信UOS》配套PPT30.11MB7月前