Skip to content

GeoJSON on steroids (using geojson-vt) - #872

Merged
mourner merged 4 commits into
mb-pagesfrom
geojson-vt
Dec 9, 2014
Merged

mourner merged 4 commits into
mb-pagesfrom
geojson-vt

Conversation

@mourner

@mourner mourner commented Dec 8, 2014

Copy link
Copy Markdown
Member

Hallelujah, it works! The super-duper-awesome GeoJSON support in GL JS.

Fixes #464 (see comments for details)
Fixes #670
Fixes #694

@jfirebaugh to review.

@mourner

mourner commented Dec 8, 2014

Copy link
Copy Markdown
Member Author

Fixing up the tests now.

@mourner

mourner commented Dec 9, 2014

Copy link
Copy Markdown
Member Author
  • fix a bug with GeoJSON not displaying after load (you need to zoom)

Comment thread js/source/source.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for this change? Sources with inline TileJSON will not have a url property.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GeoJSONSource now reuses most of Source logic, including tile loading, — it's just a quick way to silence the error thrown by TileCoord.url which doesn't get this.tiles, since for GeoJSON, we don't care about any URLs – it's just passed as null.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition should be something like !this._isGeoJSON then, otherwise this will be broken:

new Source({
  type: 'vector',
  tiles: ['http://example.com/{z}/{x}/{y}.png']
});

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, will fix.

@jfirebaugh

Copy link
Copy Markdown
Contributor

Awesome. 👍

mourner added a commit that referenced this pull request Dec 9, 2014
GeoJSON on steroids (using geojson-vt)
@mourner
mourner merged commit 7c1b0ef into mb-pages Dec 9, 2014
@mourner
mourner deleted the geojson-vt branch December 9, 2014 00:56
@averas

averas commented Dec 9, 2014

Copy link
Copy Markdown
Contributor

This is awesome! Is there a build of the mb-pages branch available or do I have to build one myself?

@mourner

mourner commented Dec 9, 2014

Copy link
Copy Markdown
Member Author

@averas you have to build one.

jfirebaugh added a commit to mapbox/mapbox-gl-test-suite that referenced this pull request Dec 12, 2014
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