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

Add GeoBuf support for GeoJSONSource#setData() #2289

Closed
tikhonbelousko opened this issue Mar 18, 2016 · 1 comment
Closed

Add GeoBuf support for GeoJSONSource#setData() #2289

tikhonbelousko opened this issue Mar 18, 2016 · 1 comment

Comments

@tikhonbelousko
Copy link

mapbox-gl-js v0.15.0:

I have a 90k of lines in my GeoJSON and I have a server which encodes it in GeoBuf which results in 1.6 Mb, if I used GeoJSON it would be 14Mb. Now I decode my GeoBuf to JS object and set it using GeoJSONSource#setData() which blocks my UI for ~4s.

As I understand, the fastest way for me to render this stuff is if GeoJSONSource#setData() with provided URL could support GeoBuf data. Which would be blazingly fast, wouldn't it?

@mourner
Copy link
Member

mourner commented Mar 18, 2016

If you specify GeoJSON as an url, it will be loaded off the main thread, not blocking anything. Since any browser can accept gzipped resources, loading times shouldn't be a big problem if it's just 14Mb non-gzipped.

Geobuf support may be introduced at some point, but for now, I'll close this as duplicate of #1504.

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

No branches or pull requests

2 participants