Conversation
dmitri-mcguckin
left a comment
There was a problem hiding this comment.
I pulled down the branch and ran npm run dev and it looks like it still has the default Vite + React web app set up.
Please make sure your latest changes are pushed up so this branch is up-to-date.
Also please add some instructions to frontend/README.md on how to setup and run the dev environment. I.e. how to install dependencies and run the dev server.
frontend-next-backup/.gitignore
Outdated
| @@ -0,0 +1,94 @@ | |||
| # Custom | |||
There was a problem hiding this comment.
Go ahead and delete the entire frontend-next-backup directory.
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.
| @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 |
There was a problem hiding this comment.
| @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 | |
| @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") | |
| try: | |
| 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 |
Go ahead and revert this file to what all is on main.
I see you added the tiles_dir and DEFAULT_TILES_DIR fields which is already accomplished via data_dir and DEFAULT_DATA_DIR.
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/tilesCo-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
Co-authored-by: Dmitri McGuckin <28746912+dmitri-mcguckin@users.noreply.github.com>
…sium into Lyla-Migration-React
Change Log