提交
This commit is contained in:
76
example/扩散圆.html
Normal file
76
example/扩散圆.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<script src="../sdk/YJEarth.min.js"></script>
|
||||
<script src="vue.js"></script>
|
||||
<style>
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="fullSize">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
CircleDiffuse: null
|
||||
},
|
||||
async mounted() {
|
||||
await YJ.on()
|
||||
this.createEarth()
|
||||
},
|
||||
methods: {
|
||||
async createEarth() {
|
||||
window.sdk = new YJ.YJEarth("app")
|
||||
YJ.Global.CesiumContainer(sdk, {
|
||||
frame: true, // 刷新率
|
||||
info: true
|
||||
})
|
||||
new YJ.Global.openLeftClick(sdk)
|
||||
var lng = 117.90365282568267
|
||||
var lat = 40.16773126252592
|
||||
this.CircleDiffuse = new YJ.Obj.CircleDiffuse(sdk, {
|
||||
id: '1111111', count: 6, lng, lat, transparency: 0.6, circle: [{ radius: 40, color: '#1aff00' }, { radius: 100, color: '#ffe600' }], label: {
|
||||
"text": "未命名对象111",
|
||||
"show": true,
|
||||
"position": {
|
||||
"lng": 117.90365282568267,
|
||||
"lat": 40.16773126252592,
|
||||
"alt": 100
|
||||
},
|
||||
"fontSize": 20,
|
||||
// fontFamily: 1,
|
||||
"color": "#ffffff",
|
||||
"lineWidth": 4,
|
||||
"pixelOffset": 20,
|
||||
"backgroundColor": [
|
||||
"#42c6ef",
|
||||
"#42c6ef"
|
||||
],
|
||||
"lineColor": "#fff000",
|
||||
"scaleByDistance": false,
|
||||
"near": 2000,
|
||||
"far": 100000
|
||||
}
|
||||
})
|
||||
this.CircleDiffuse2 = new YJ.Obj.CircleDiffuse(sdk, { lng: 101, lat: 36, circle: [{ radius: 100 }], label: {show: true} })
|
||||
this.CircleDiffuse2.flyTo()
|
||||
this.CircleDiffuse2.edit(true)
|
||||
window.CircleDiffuse2 = this.CircleDiffuse2
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user