diff --git a/.gitignore b/.gitignore index a547bf3..95aa5fe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,12 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +.vscode node_modules dist dist-ssr *.local +public/Cesium # Editor directories and files .vscode/* diff --git a/package.json b/package.json index 6900f12..2abf925 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview --port 10005" }, "dependencies": { "cesium": "^1.92.0", diff --git a/src/App.vue b/src/App.vue index d9ceb33..e6ce5ef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,6 +8,7 @@ + @@ -40,4 +42,10 @@ html, body, #app { top: 100px; left: 15px; } + +#hotlandmark { + position: absolute; + bottom: 30px; + right: 10px; +} diff --git a/src/assets/compass.png b/src/assets/compass.png new file mode 100644 index 0000000..c7796e0 Binary files /dev/null and b/src/assets/compass.png differ diff --git a/src/assets/down.png b/src/assets/down.png new file mode 100644 index 0000000..5babcb6 Binary files /dev/null and b/src/assets/down.png differ diff --git a/src/assets/up.png b/src/assets/up.png new file mode 100644 index 0000000..22a6c89 Binary files /dev/null and b/src/assets/up.png differ diff --git a/src/components/Compass.vue b/src/components/Compass.vue new file mode 100644 index 0000000..77b8e70 --- /dev/null +++ b/src/components/Compass.vue @@ -0,0 +1,32 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/components/Earth.vue b/src/components/Earth.vue index dcc1829..af8de22 100644 --- a/src/components/Earth.vue +++ b/src/components/Earth.vue @@ -1,76 +1,95 @@ - - + + > + - + + > + - + + + + \ No newline at end of file +}); + +// 默认值 天安门广场经纬度 116.39140105, 39.90452844 高度 2000.0 +const pointTo = () => { + let initialPosition = Cesium.Cartesian3.fromDegrees(position.lng?position.lng:116.39140105, position.lat?position.lat:39.90452844, 2000.0); + let initialOrientation = Cesium.HeadingPitchRoll.fromDegrees(0.0, -90.0, 0.0); + viewer.camera.flyTo({ + destination: initialPosition, + orientation: initialOrientation, + endtransform: Cesium.Matrix4.IDENTITY, + }); +} + diff --git a/src/components/HotLandmark.vue b/src/components/HotLandmark.vue new file mode 100644 index 0000000..8754c13 --- /dev/null +++ b/src/components/HotLandmark.vue @@ -0,0 +1,129 @@ + + + + + + + + + + + + + 景点名称 + 经度 + 纬度 + 访问景点 + + + + + {{ item ? item.landmark : index+1 }} + {{ item ? item.lng : "" }} + {{ item ? item.lat : "" }} + 访问 + + + + + + + + + + diff --git a/src/components/LonlatTable.vue b/src/components/LonlatTable.vue index b345afb..086b684 100644 --- a/src/components/LonlatTable.vue +++ b/src/components/LonlatTable.vue @@ -33,6 +33,7 @@ table { border-radius: 7px; border-collapse: separate; border-spacing: 2px; + text-align:center; } table th:first-child {