fix
This commit is contained in:
parent
0ad04d742c
commit
fc4fb9efb1
31
src/components/domain/Three/SceneOne/ViewerImageLayer.jsx
Normal file
31
src/components/domain/Three/SceneOne/ViewerImageLayer.jsx
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { useMemo } from "react";
|
||||||
|
import { ImageryLayer } from "resium";
|
||||||
|
import { WebMapServiceImageryProvider } from "cesium";
|
||||||
|
|
||||||
|
const url = "http://analysis.tpdc.ac.cn/gs/geoserver/phitrellis/wms";
|
||||||
|
const name = "phitrellis:4_3_1_tas_Layer1";
|
||||||
|
|
||||||
|
function LandImageLayer() {
|
||||||
|
const tempProvider = useMemo(
|
||||||
|
() =>
|
||||||
|
new WebMapServiceImageryProvider({
|
||||||
|
url: url,
|
||||||
|
layers: name,
|
||||||
|
parameters: {
|
||||||
|
service: "WMS",
|
||||||
|
format: "image/png",
|
||||||
|
transparent: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
[name, url]
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<ImageryLayer
|
||||||
|
key={`ImageryLayer-${name}`}
|
||||||
|
imageryProvider={tempProvider}
|
||||||
|
show={true}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LandImageLayer;
|
@ -3,7 +3,7 @@ import { Cartesian3 } from "cesium";
|
|||||||
import MapLayout from "@/components/map/Layout";
|
import MapLayout from "@/components/map/Layout";
|
||||||
import CustomToolbar from "@/components/common/CustomToolbar";
|
import CustomToolbar from "@/components/common/CustomToolbar";
|
||||||
import CustomClock from "@/components/common/CustomClock";
|
import CustomClock from "@/components/common/CustomClock";
|
||||||
import LandImageLayer from "../LandImageLayer";
|
import ViewerImageLayer from "./ViewerImageLayer";
|
||||||
import WavePoint from "@/components/common/WavePoint";
|
import WavePoint from "@/components/common/WavePoint";
|
||||||
|
|
||||||
function ViewerOne({ children }) {
|
function ViewerOne({ children }) {
|
||||||
@ -21,7 +21,7 @@ function ViewerOne({ children }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<WavePoint stationLon={88} stationLat={-85} labelText={"南极"} />
|
<WavePoint stationLon={88} stationLat={-85} labelText={"南极"} />
|
||||||
<LandImageLayer />
|
<ViewerImageLayer />
|
||||||
{children}
|
{children}
|
||||||
</MapLayout>
|
</MapLayout>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,6 +2,7 @@ import { CameraFlyTo } from "resium";
|
|||||||
import { Cartesian3 } from "cesium";
|
import { Cartesian3 } from "cesium";
|
||||||
import MapLayout from "@/components/map/Layout";
|
import MapLayout from "@/components/map/Layout";
|
||||||
import WavePoint from "@/components/common/WavePoint";
|
import WavePoint from "@/components/common/WavePoint";
|
||||||
|
import ViewerImageLayer from "./ViewerImageLayer";
|
||||||
|
|
||||||
function ViewerThree({ children }) {
|
function ViewerThree({ children }) {
|
||||||
return (
|
return (
|
||||||
@ -13,6 +14,7 @@ function ViewerThree({ children }) {
|
|||||||
/>
|
/>
|
||||||
<WavePoint stationLon={88} stationLat={33} labelText={"青藏高原"} />
|
<WavePoint stationLon={88} stationLat={33} labelText={"青藏高原"} />
|
||||||
{children}
|
{children}
|
||||||
|
<ViewerImageLayer />
|
||||||
</MapLayout>
|
</MapLayout>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { CameraFlyTo } from "resium";
|
import { CameraFlyTo } from "resium";
|
||||||
import { Cartesian3 } from "cesium";
|
import { Cartesian3 } from "cesium";
|
||||||
import MapLayout from "@/components/map/Layout";
|
import MapLayout from "@/components/map/Layout";
|
||||||
import OceanImageLayer from "../OceanImageLayer";
|
import ViewerImageLayer from "./ViewerImageLayer";
|
||||||
import WavePoint from "@/components/common/WavePoint";
|
import WavePoint from "@/components/common/WavePoint";
|
||||||
|
|
||||||
function ViewerTwo({ children }) {
|
function ViewerTwo({ children }) {
|
||||||
return (
|
return (
|
||||||
<div className="domain-viewer">
|
<div className="domain-viewer">
|
||||||
<MapLayout>
|
<MapLayout>
|
||||||
<OceanImageLayer />
|
<ViewerImageLayer />
|
||||||
<CameraFlyTo
|
<CameraFlyTo
|
||||||
duration={5}
|
duration={5}
|
||||||
destination={Cartesian3.fromDegrees(0, 88, 10000000)}
|
destination={Cartesian3.fromDegrees(0, 88, 10000000)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user