-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat: proxy for mapbox #730
Conversation
Works on localhost, but on staging, directions work but tiles don't 😭 |
My only theory rn is that staging didn't actually update the backend when I updated the tile proxy code, so I'm gonna try opening another PR on the same branch to get another fresh staging deployment |
Interestingly, now it marks the staging deploy for this PR as |
ok I kinda figured it out. The response is larger because it's base64 encoding the image. I manually verified this with |
FWIW, this is exactly what I was anticipating when you suggested proxying image requests from S3 lol. Dealing with encoding over Lambda is a headache, and why I like to have the browser do it when it fetches directly from S3 :^) P.S. If it's possible, I'd like to have a solution that doesn't involve editing the devops, because I don't like complexity there 🤓 |
This isn't even touching S3 yet, what I'm stuck on is literally just the thinnest proxy possible with no caching on our end.
I'm not sure this is possible with how the current solution is looking. One thing we could do is swap out our tile provider but keep the directions api integration, but I've tried ~20 tilesets so far and they all are worse than MapBox's. https://wiki.openstreetmap.org/wiki/Raster_tile_providers Most of them have either not enough detail like the names of the buildings, or too much extraneous overlay info. |
SO post that did the trick: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ap0nia can you take a look and lmk if it looks good? Since it's your PR I can't request your review (maybe you can self-request?) Worst-case I can just override and merge.
Holy shit you're actually doing this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything looks reasonable
Now we hope and pray that nothing different about prod breaks CORS or anything 🙏 |
Summary