mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-24 03:27:29 +00:00
33 lines
818 B
TypeScript
33 lines
818 B
TypeScript
import CesiumPlot from "../src";
|
|
import * as Cesium from "./cesium/index";
|
|
|
|
let raster = new Cesium.ArcGisMapServerImageryProvider({
|
|
url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
|
|
});
|
|
const viewer = new Cesium.Viewer("cesiumContainer", {
|
|
animation: false,
|
|
shouldAnimate: true,
|
|
geocoder: false,
|
|
homeButton: false,
|
|
infoBox: false,
|
|
fullscreenButton: false,
|
|
sceneModePicker: false,
|
|
selectionIndicator: false,
|
|
timeline: false,
|
|
navigationHelpButton: false,
|
|
baseLayerPicker: false,
|
|
imageryProvider: raster,
|
|
contextOptions: {
|
|
requestWebgl2: true,
|
|
},
|
|
});
|
|
|
|
viewer.scene.camera.setView({
|
|
destination: Cesium.Cartesian3.fromDegrees(107.857, 35.594498, 8000000),
|
|
});
|
|
|
|
|
|
document.getElementById("drawStraightArrow").onclick = () => {
|
|
new CesiumPlot();
|
|
};
|