You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, as discussed, we've integrated the canvas styles in your example (on the canvas_type branch) with react-map-gl to see if we can use this feature to improve integration with deck.gl.
We can get a canvas to render as a "mapbox layer" in react-map-gl however we have some issues/questions:
We don't know when to render. This is probably not critical as we can keep rendering using our own dirty tracking but it would be cool with a callback.
it might be a little more efficient as we'd not draw unless mapbox draws.
it might also allow us to create nicer code for this on our end.
More importantly, this feature is limited without picking integration
presumably a callback with x,y coords?
If not we'll have to intercept events and do uncoordinated picking
Handling perspective seems to involve a bunch of tricky math (as usual). Assume we'll need to calculate a canvas size using a perspective enable fitBounds operation with both long/lats and pixel sizes set to cover the entire screen.
Q: The code we are using right now is more or less straight from your example. Are there any docs on the branch we should be looking for?
Thanks for the interest @ibgreen. As you can tell, this branch is still under development so we don't have any documentation or good answers for all of those questions yet. We really appreciate the early feedback. It will help us shape our implementation.
1. We don't know when to render. This is probably not critical as we can keep rendering using our own dirty tracking but it would be cool with a callback.
We are considering a beforerender/willrender event to compliment our existing render event (which fires after the map renders). Would that work for your use?
2. More importantly, this feature is limited without picking integration
Are you asking about custom layer types in conjunction withqueryRenderedFeatures? This isn't something we've considered yet. There's no technical reason we can't support queryRenderedFeatures on custom layer types.
Handling perspective seems to involve a bunch of tricky math (as usual). Assume we'll need to calculate a canvas size using a perspective enable fitBounds operation with both long/lats and pixel sizes set to cover the entire screen.
There are a number of implementation decisions we haven't made yet that'll affect your ability to render pitched geometries. We may decide to:
expose a transformation matrix to custom layers which encode the camera position
allow the canvas to be rendered unpitched and covering the whole viewport
Closing this ticket to push future conversation to #3580
Hi, as discussed, we've integrated the canvas styles in your example (on the
canvas_type
branch) withreact-map-gl
to see if we can use this feature to improve integration with deck.gl.We can get a canvas to render as a "mapbox layer" in react-map-gl however we have some issues/questions:
Q: The code we are using right now is more or less straight from your example. Are there any docs on the branch we should be looking for?
@Pessimistress @abmai @vicapow @apercu @gnavvy
The text was updated successfully, but these errors were encountered: