Option to switch to remote version of Mapbox GL JS v2 #104
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.
Hi @crazycapivara -
Following our discussion in #103, this PR gives users the option to switch to a remote version of Mapbox GL JS v2. (An option to download the dependencies locally can follow, but I wanted to keep this minimal). The new function is
mapboxer_use_v2()
, which functions similarly tosf::sf_use_s2()
in that users can supplyTRUE
orFALSE
to switch the option on or off. The new code shouldn't impact any users' existing code, but gives users the option to incorporate new features in GL JS v2 if they want to switch on the option.This example illustrates how to use the example in
vector-layer-filled-polygons.R
but with a 3D globe projection, available in GL JS v2.Thanks for considering the PR!