-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
🎉 InitialCommit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
.node-version | ||
yarn.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 100, | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"semi": true, | ||
"singleQuote": true, | ||
"endOfLine": "lf" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,153 @@ | ||
# cesium-starter | ||
Start Cesium easily. [Cesium, webpack] | ||
|
||
![README02](img/README02.png) | ||
|
||
Start Cesium easily. | ||
- [Cesium v1.93.0](https://github.com/CesiumGS/cesium) | ||
- [webpack v5.49.0](https://webpack.js.org) | ||
- node v16.10.0 | ||
- npm v7.24.0 | ||
|
||
<br> | ||
|
||
## Usage | ||
|
||
![README03](img/README03.png) | ||
|
||
<br> | ||
|
||
Install package | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
<br> | ||
|
||
Add link to widgets.css | ||
|
||
/node_modules/cesium/package.json | ||
|
||
```json | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"require": "./index.cjs", | ||
"import": "./Source/Cesium.js" | ||
}, | ||
"./Build/Cesium/Widgets/widgets.css": "./Build/Cesium/Widgets/widgets.css" | ||
}, | ||
``` | ||
|
||
<br> | ||
|
||
build | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
<br> | ||
|
||
dev | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
--- | ||
|
||
<br> | ||
<br> | ||
|
||
![README01](img/README01.gif) | ||
|
||
<br> | ||
|
||
## License | ||
MIT | ||
|
||
Copyright (c) 2022 Yasunori Kirimoto | ||
|
||
<br> | ||
|
||
--- | ||
|
||
<br> | ||
|
||
### Japanese | ||
|
||
<br> | ||
|
||
# Cesium スターター | ||
|
||
![README02](img/README02.png) | ||
|
||
Cesiumを手軽に始める | ||
- [Cesium v1.93.0](https://github.com/CesiumGS/cesium) | ||
- [webpack v5.49.0](https://webpack.js.org) | ||
- node v16.10.0 | ||
- npm v7.24.0 | ||
|
||
<br> | ||
|
||
## 使用方法 | ||
|
||
![README03](img/README03.png) | ||
|
||
<br> | ||
|
||
パッケージインストール | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
<br> | ||
|
||
widgets.cssのリンクを追加 | ||
|
||
/node_modules/cesium/package.json | ||
|
||
```json | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"require": "./index.cjs", | ||
"import": "./Source/Cesium.js" | ||
}, | ||
"./Build/Cesium/Widgets/widgets.css": "./Build/Cesium/Widgets/widgets.css" | ||
}, | ||
``` | ||
|
||
|
||
|
||
<br> | ||
|
||
ビルド | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
<br> | ||
|
||
開発 | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
<br> | ||
<br> | ||
|
||
![README01](img/README01.gif) | ||
|
||
<br> | ||
|
||
## ライセンス | ||
MIT | ||
|
||
Copyright (c) 2022 Yasunori Kirimoto | ||
|
||
<br> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
#map { | ||
z-index: 0; | ||
height: 100%; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const m_mono = new Cesium.UrlTemplateImageryProvider({ | ||
url: 'https://tile.mierune.co.jp/mierune_mono/{z}/{x}/{y}.png', | ||
credit: new Cesium.Credit( | ||
"Maptiles by <a href='http://mierune.co.jp' target='_blank'>MIERUNE</a>, under CC BY. Data by <a href='http://osm.org/copyright' target='_blank'>OpenStreetMap</a> contributors, under ODbL." | ||
), | ||
}); | ||
|
||
const viewer = new Cesium.Viewer('map', { | ||
baseLayerPicker: false, | ||
geocoder: false, | ||
homeButton: false, | ||
timeline: false, | ||
animation: false, | ||
imageryProvider: m_mono, | ||
}); | ||
|
||
viewer.camera.flyTo({ | ||
destination: Cesium.Cartesian3.fromDegrees(139.5, 33.0, 100000.0), | ||
orientation: { | ||
pitch: -0.3, | ||
roll: -0.25, | ||
}, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'cesium/Build/Cesium/Widgets/widgets.css'; | ||
import './css/style.css'; | ||
import './js/script.js'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Cesium Starter</title> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
<script src="app.js"></script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0"> | ||
<Title>NE2_HR_LC_SR_W_DR_recolored.tif</Title> | ||
<Abstract></Abstract> | ||
<SRS>EPSG:4326</SRS> | ||
<BoundingBox miny="-90.00000000000000" minx="-180.00000000000000" maxy="90.00000000000000" maxx="180.00000000000000"/> | ||
<Origin y="-90.00000000000000" x="-180.00000000000000"/> | ||
<TileFormat width="256" height="256" mime-type="image/jpg" extension="jpg"/> | ||
<TileSets profile="geodetic"> | ||
<TileSet href="0" units-per-pixel="0.70312500000000" order="0"/> | ||
<TileSet href="1" units-per-pixel="0.35156250000000" order="1"/> | ||
<TileSet href="2" units-per-pixel="0.17578125000000" order="2"/> | ||
</TileSets> | ||
</TileMap> |
Large diffs are not rendered by default.