-
Notifications
You must be signed in to change notification settings - Fork 97
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
GFW 4.0: MapboxGL + Vector Plantations Layer #3702
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfrico
approved these changes
Mar 11, 2019
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.
A lot to cover, but overall looks good and works fine on local. Good job 👍
data.map(d => { | ||
const bboxCoords = d.bbox.slice(0, 4); | ||
const bboxFromCoords = bbox(lineString(bboxCoords)); | ||
const reverseBbox = [ |
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.
Why do you reverse the bounding box?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's time for another upgrade! For the previous 3.0 release we rebuilt the whole map stack, built and open source layer manager, moved all the layers and data to the API, and built a significant amount of new code and features. All of this on top of the leaflet stack we had been developing along side Resource Watch. Now it's time to take it one step further and upgrade the entire map, API layers, and layer manager to Mapbox and vector layers. The original motivation for this change was to allow the displaying of the new Global Plantations layer which contains over 2.5 million geoms and metadata, making it too large to be handled by a GeoJSON layer in leaflet (or even a vector layer on leaflet), and still function within the map alongside the other layers. The solution is this PR!
The core upgrades we have made are:
vectorLayers
style. Thanks to @01painadam and @benlaken for their mastery of the API.queryFeatures
API.Key breaking changes in GFW:
viewport-web-mercator
.Many many thanks to all involved in this feature. Some particular favourites: @mbarrenechea @01painadam @davidsingal @andresgnlez @blayhem @benlaken @faustoperez @danielcasius @Jamie-Gibson @sorodrigo