-
Notifications
You must be signed in to change notification settings - Fork 3
Migration from NextJS to React #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
44268c2
308d1cf
5c3fa0b
6a12635
69bae05
d3e7d85
5daadae
b6e0295
23f9dd9
5769767
69077b1
1a68ee4
503f767
3243665
b6f6f4a
c783eac
2768d06
76c8ecb
4dfff56
1878075
879b564
f80932c
0350601
c9bf49f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,11 +7,18 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @view_tiles.route("/<int:zoom>/<int:x>/<int:y>.png") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def get_tile(zoom: int, x: int, y: int): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_dir = current_app.data_dir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tile_path = abspath(f"{data_dir}/tiles/{zoom}/{x}/{y}.png") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tiles_dir = getattr(current_app, "tiles_dir", "../geo-tiles/tiles") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tile_path = abspath(f"{tiles_dir}/tiles/{zoom}/{x}/{y}.png") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f"[TILE DEBUG] Tile path being served: {tile_path}") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #tile_path = abspath(f"{data_dir}/tiles/{zoom}/{x}/{y}.png") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #print(f"[TILE DEBUG] Tile path being served: {tile_path}") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exists(tile_path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #exists(tile_path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return send_file(tile_path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| except FileNotFoundError: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return {"err": f"No such tile for {x} by {y} at a zoom of {zoom}"}, 404 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
8
to
16
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Go ahead and revert this file to what all is on I see you added the You may dynamically change what the data-dir is by feeding it in as a cmd line parameter like so: python -m cesium_api --data-dir ../geo-tiles/tiles |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # Custom | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Go ahead and delete the entire We will still have a backup of the old history by being able to go back and look at the history in the git repo. |
||
| out | ||
|
|
||
| # See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
|
||
| # compiled output | ||
| /dist | ||
| /tmp | ||
| /out-tsc | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # Bower dependency directory (https://bower.io/) | ||
| bower_components | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # IDEs and editors | ||
| .idea | ||
| .project | ||
| .classpath | ||
| .c9/ | ||
| *.launch | ||
| .settings/ | ||
| *.sublime-workspace | ||
|
|
||
| # IDE - VSCode | ||
| .vscode/* | ||
| !.vscode/settings.json | ||
| !.vscode/tasks.json | ||
| !.vscode/launch.json | ||
| !.vscode/extensions.json | ||
|
|
||
| # misc | ||
| .sass-cache | ||
| connect.lock | ||
| typings | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
|
|
||
| # dotenv environment variables file | ||
| .env* | ||
|
|
||
| # next.js build output | ||
| .next | ||
|
|
||
| # Lerna | ||
| lerna-debug.log | ||
|
|
||
| # System Files | ||
| .DS_Store | ||
| Thumbs.db | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| ### Cesium Front-End Application | ||
|
|
||
| ```bash | ||
| cd frontend | ||
| ``` | ||
|
|
||
| Install `nodejs` and `yarn` for your system | ||
|
|
||
| ```bash | ||
| sudo apt install nodejs yarnpkg | ||
| ``` | ||
|
|
||
| Install JavaScript dependencies | ||
|
|
||
| ```bash | ||
| yarn install | ||
| ``` | ||
|
|
||
| Start the app | ||
|
|
||
| ```bash | ||
| yarn dev | ||
| ``` | ||
|
|
||
| Goto `localhost3000` in a web browser | ||
|
|
||
| [GDAL]:https//gdal.org | ||
| [GDAL Download]:https//gdal.org/download.html | ||
| [CesiumJS]:https//github.com/CesiumGS/cesium |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,6 @@ services: | |
| build: | ||
| context: . | ||
| ports: | ||
| - '3000:3000' | ||
| - '7008:3000' | ||
| env_file: | ||
| - .env.production | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "uniclogs-cesium", | ||
| "version": "1.0.2", | ||
| "private": true, | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "build": "next build", | ||
| "start": "next start", | ||
| "postinstall": "symlink-dir node_modules/cesium/Build/Cesium public/cesium" | ||
| }, | ||
| "dependencies": { | ||
| "bootstrap": "5.3.3", | ||
| "cesium": "1.124.0", | ||
| "next": "15.2.3", | ||
| "prop-types": "^15.8.1", | ||
| "react": "18.3.1", | ||
| "react-bootstrap": "2.10.6", | ||
| "react-dom": "18.3.1", | ||
| "resium": "^1.18.2" | ||
| }, | ||
| "devDependencies": { | ||
| "eslint": "^9.16.0", | ||
| "eslint-config-airbnb": "^19.0.4", | ||
| "eslint-config-next": "15.0.3", | ||
| "eslint-plugin-import": "^2.31.0", | ||
| "eslint-plugin-jsx-a11y": "^6.10.0", | ||
| "eslint-plugin-react": "^7.37.2", | ||
| "eslint-plugin-react-hooks": "^5.0.0", | ||
| "symlink-dir": "^6.0.3" | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.