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

fix: Add polyfill for use in browsers when qs.unescape is unavailable #208

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

Conversation

okdistribute
Copy link

@okdistribute okdistribute commented Apr 20, 2018

In browser environments when using browserify, qs.unescape is not defined. Although this is a problem with the underlying querystring module not being up to date with node core, and not a problem with tilelive itself, there have been multiple attempts to update the querystring module without success. See the following issue threads: Gozala/querystring#20 (open since April 2017) and Gozala/querystring#6 (open since 2015)

@jingsam
Copy link
Contributor

jingsam commented Apr 21, 2018

tilelive is not intended for been used in browser enviroment. So it maybe useless to add this polyfill

@okdistribute
Copy link
Author

@jingsam it works perfectly fine in a browser environment with this polyfill.

@okdistribute
Copy link
Author

Think this might be able to be merged?

@okdistribute
Copy link
Author

OK I'm making a new package, tilelive-browser

@mapsam
Copy link
Contributor

mapsam commented Jan 10, 2019

@Karissa sorry for the silence here. In general I think this is a great change, but I'm hesitant to flat-out say tilelive works in the browser (i.e. my frontend experience is limited and if we document that this works in browsers, that opens up a whole new path of issues in the future that we won't be able to effectively respond to). I like your idea of creating tilelive-browser 👍 - will gladly add that to the list of tilelive plugins in the README!

@jingsam
Copy link
Contributor

jingsam commented Jan 11, 2019

I am very curious on the use cases that run tilelive in browsers.

@okdistribute
Copy link
Author

Hey @jingsam, we built a user interface where users can select a bounding box they want to download in an interactive map. It will then download those tiles for them into a tar file, which is saved in the user's cache (so it can expand without memory limits). See https://github.com/digidem/tile-downloader and https://github.com/karissa/mapbox-download-ctrl/

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