Skip to content

Commit 58ea0fb

Browse files
committed
chore: update to last version
1 parent 85723c6 commit 58ea0fb

File tree

14 files changed

+790
-721
lines changed

14 files changed

+790
-721
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ package.json
1111
.*.js
1212
*.config.js
1313

14-
/src/utils/registerServiceWorker.js
14+
/src/utils/registerServiceWorker.js
15+
/src/libs/

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
'no-console': 'off',
99
'no-debugger': 'off',
1010
'no-unused-vars': 'off',
11-
'prettier/prettier': 'error'
11+
'prettier/prettier': process.env.NODE_ENV === 'development' ? 'warn' : 'error',
1212
// '@typescript-eslint/no-unused-vars': 'off'
13-
}
13+
},
1414
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
public/3D Tiles/Test_mode

package-lock.json

Lines changed: 654 additions & 625 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"@hot-loader/react-dom": "^16.13.0",
1919
"antd": "^3.26.18",
2020
"cesium": "^1.73.0",
21+
"cesium-tdt": "^1.1.0",
2122
"memoize-one": "^5.1.1",
22-
"mobx": "^5.15.6",
23+
"mobx": "^5.15.7",
2324
"mobx-react": "^6.3.0",
2425
"react": "^16.13.1",
2526
"react-dom": "^16.13.1",
@@ -55,7 +56,7 @@
5556
"@craco/craco": "^5.6.4",
5657
"@types/jest": "^26.0.14",
5758
"@types/memoize-one": "^5.1.2",
58-
"@types/node": "^14.11.1",
59+
"@types/node": "^14.11.2",
5960
"@types/react": "^16.9.49",
6061
"@types/react-dom": "^16.9.8",
6162
"babel-plugin-import": "^1.13.0",
@@ -67,7 +68,7 @@
6768
"lint-staged": "^10.4.0",
6869
"patch-package": "^6.2.2",
6970
"prettier": "^2.1.2",
70-
"react-hot-loader": "^4.12.21",
71+
"react-hot-loader": "^4.13.0",
7172
"react-scripts": "^3.4.3",
7273
"typescript": "^3.9.7"
7374
}

src/config/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const cesiumAccessToken =
2+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMWQ3MWM4Yy01ZGZjLTRkZGEtYjJhMi1hMDdkYWZhN2I2YWYiLCJpZCI6NTc3Nywic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2MTUzNDQwMX0.h8scGb5fMjG2UFsqvXpQL7YvCheiI-YWUQUyBcQym5s';
3+
4+
export const cesiumDefalutConfig = {
5+
cesiumAccessToken,
6+
defaultView: [80, 22, 130, 50],
7+
};

src/containers/AppViewer/Czml.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import React from 'react';
2-
import Cesium from 'cesium';
2+
import { Viewer, Resource } from 'cesium';
33
import { CzmlDataSource, withCesium } from 'resium';
4-
import { Resource } from '@/stores/modules/appViewer';
54

65
interface Iprops {
7-
cesium?: { viewer: Cesium.Viewer };
8-
czmlData: Resource;
6+
cesium?: { viewer: Viewer };
7+
czmlData: string | object | Resource | undefined;
98
}
109

1110
const Czml: React.FunctionComponent<Iprops> = ({ cesium, czmlData }) => {

src/containers/AppViewer/Entitys.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { Color, Cartesian3 } from 'cesium';
33
import { Entity, PointGraphics, EntityDescription } from 'resium';
44

55
const Entitys = () => {
6-
const entityPosition = Cartesian3.fromDegrees(105.0707383, 30.7117244, 100);
6+
const entityPosition = Cartesian3.fromDegrees(104.0707383, 30.7117244, 100);
77
console.log('Entitys render');
88
return (
9-
<Entity name="Sokyo" position={entityPosition}>
10-
<PointGraphics pixelSize={25} color={Color.CRIMSON} outlineWidth={5} outlineColor={Color.LIGHTCORAL} />
9+
<Entity name="成都" position={entityPosition}>
10+
<PointGraphics pixelSize={3} color={Color.CRIMSON} outlineWidth={1} outlineColor={Color.LIGHTCORAL} />
1111
<EntityDescription>
1212
<h1>Hello, world.</h1>
13-
<p>JSX is available here!</p>
13+
<p>成都!</p>
1414
</EntityDescription>
1515
</Entity>
1616
);

src/containers/AppViewer/GeoJson.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import React from 'react';
2-
import { Viewer as CesiumViewer } from 'cesium';
2+
import { Viewer as CesiumViewer, Resource } from 'cesium';
33
import { GeoJsonDataSource, Context, useCesium } from 'resium';
4-
import { Resource } from '@/stores/modules/appViewer';
54

65
interface Iprops {
7-
geoJsonData: Resource;
6+
geoJsonData: string | object | Resource | undefined;
87
}
98

109
interface ICesiumContext {

src/containers/AppViewer/ImageryLayers.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ import React from 'react';
22
import { WebMapTileServiceImageryProvider } from 'cesium';
33
import { ImageryLayer } from 'resium';
44
import memoize from 'memoize-one';
5-
import { WebMapTileServiceImagery } from '@/stores/modules/appViewer';
65

76
const imageryProvider = memoize((imageryProvider) => new WebMapTileServiceImageryProvider(imageryProvider));
87

98
const ImageryLayers = React.memo(
10-
({ imageryProviders }: { imageryProviders: WebMapTileServiceImagery[] }) => {
9+
({ imageryProviders }: { imageryProviders: WebMapTileServiceImageryProvider.ConstructorOptions[] }) => {
1110
console.log('ImageryLayers render');
1211
return (
1312
<>

0 commit comments

Comments
 (0)