-
Notifications
You must be signed in to change notification settings - Fork 2
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 support for renderWorldCopies #6
Comments
Referencing the conversation to mapbox gl js. |
@cammanderson adding a setter for the |
Hi @mollymerp, Thanks for offering :-) I would definitely be happy receiving a PR for this update, but I would like to understand how to 'unset' this option if the prop value changes. I have asked the mapbox developers if there is an API method as I just can't find one at the moment. I fear that it would mean you need to 'recreate' the map to change this value if the prop value changes. |
Apologies @mollymerp, I totally thought this was from a different perspective and totally mis-read your message! Also, I apologise for not recognising you! Thanks for reaching out to this thread, I will have a look at submitting a PR across to you guys :-) |
My mistake as well! I thought this was an issue in the mapbox-gl-js repo 🙈 -- I'll open a ticket for this over there. |
Here's the issue mapbox/mapbox-gl-js#4039 and another one that may be relevant to this project mapbox/mapbox-gl-js#4029 |
You're a champion :) |
With the addition in mapbox release version 0.31, it is possible to control the renderWorldCopies property. While the property is exposed to the constructor, it is not available as an API call to toggle this behaviour later.
I have raised a comment against the original ticket thread in order to see what is possible with an exposed API, but I doubt there is priority for this use case. We will see. In the meantime, I have added this down as a possible enhancement.
The update would be in map.jsx to add a prop of renderWorldCopiesDisabled and default to false. We would then update the constructor options to read from it. That update is trivial. The next update would be to compare the values of current versus next props to determine the user making a change and call the API. As this is missing, a work around could be to recreate the map instance which probably isn't ideal.
The text was updated successfully, but these errors were encountered: