Skip to content
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

Added offline support #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added offline support #9

wants to merge 4 commits into from

Conversation

han-steve
Copy link
Contributor

Finally added offline support. Run the server by yarn server. You need an extension to block CORS in chrome (is there any way to avoid this? Can I just have the tiles be served in localhost instead of another server?). Since the tiles downloaded are mostly at 15x zoom, zooming out and moving around on the map can cause them to disappear. But it should serve the purpose for now.

@sshh12 sshh12 self-requested a review March 27, 2020 20:12
@sshh12
Copy link
Member

sshh12 commented Mar 27, 2020

@SteveHan-233 can you fix conflicts

@han-steve
Copy link
Contributor Author

@SteveHan-233 can you fix conflicts

There's only one conflict left. Can you copy the values for the coordinates into your config file?

@sshh12
Copy link
Member

sshh12 commented Apr 1, 2020

Hey @SteveHan-233,

  • Can you explain the difference between tiles/ and Server/?
  • Move the mapbox-gl.css and js to some where else other than the root directory (just somewhere more specific to how it's used)
  • Can you add any test files and map pngs to the .gitignore (You will need to delete them, commit, add to gitignore, commit)

@han-steve
Copy link
Contributor Author

Hey @SteveHan-233,

  • Can you explain the difference between tiles/ and Server/?
  • Move the mapbox-gl.css and js to some where else other than the root directory (just somewhere more specific to how it's used)
  • Can you add any test files and map pngs to the .gitignore (You will need to delete them, commit, add to gitignore, commit)

Sorry for the late reply. 1. tiles/ was excessive and I deleted it. 2. I moved them to public/ 3. I'm not sure what you mean. Why do you want to put the pictures in git ignore? Don't I have to push it onto GitHub for you to access them?

@sshh12
Copy link
Member

sshh12 commented Apr 7, 2020

We should be able to just run the script and generate them. This way we don't bloat the repo's filesize and we can just generate images for a location when we need them (e.g. before flight tests that are not at the same location).

@han-steve
Copy link
Contributor Author

We should be able to just run the script and generate them. This way we don't bloat the repo's filesize and we can just generate images for a location when we need them (e.g. before flight tests that are not at the same location).

The way I got the images was by opening up chrome, checking the network tab to see the tiles requested from the server, copying and pasting their links into a text file, and then having the python script read the links and download the images. I don't think I can automate this process.

@sshh12
Copy link
Member

sshh12 commented Apr 8, 2020

Darn, in that case just zip the images you have and store them somewhere else for now. Then add maybe a "OFFLINE.md" readme that details how you got the images.

@alexwitt23
Copy link
Member

I'd recommend writing the files to some predictable directory outside the repo. Then you don't have to worry about them being committed

@sshh12 sshh12 removed their request for review October 29, 2020 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants