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 support for renderWorldCopies #6

Open
cammanderson opened this issue Jan 19, 2017 · 7 comments
Open

Add support for renderWorldCopies #6

cammanderson opened this issue Jan 19, 2017 · 7 comments

Comments

@cammanderson
Copy link
Contributor

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.

@cammanderson
Copy link
Contributor Author

Referencing the conversation to mapbox gl js.

@mollymerp
Copy link

mollymerp commented Jan 23, 2017

@cammanderson adding a setter for the renderWorldCopies option would be fairly straightforward. Would you be interested in submitting a PR for this feature?

@cammanderson
Copy link
Contributor Author

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.

@cammanderson
Copy link
Contributor Author

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 :-)

@mollymerp
Copy link

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.

@mollymerp
Copy link

Here's the issue mapbox/mapbox-gl-js#4039 and another one that may be relevant to this project mapbox/mapbox-gl-js#4029

@cammanderson
Copy link
Contributor Author

You're a champion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants