Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNew editorOptions= argument for lower-level toolbar customization #100
Conversation
|
|
|
@JoshOBrien this looks good to me. See my comment here. I haven't tested any of it though (just looked over it). |
|
thanks! |
| ##' \code{leafpm::addPmToolbar}. | ||
| processOpts <- function(fun, args) { | ||
| ## Account for special meaning of `FALSE` as arg in leaflet.extras | ||
| if(isFALSE(args)) { |
timelyportfolio
Jul 17, 2019
Contributor
can we use r-spatial/mapview#177 technique instead? I would prefer not to force users to have to upgrade to newer version of R. I am sensitive to this since this has blocked me inside restrictive employers from using some packages.
can we use r-spatial/mapview#177 technique instead? I would prefer not to force users to have to upgrade to newer version of R. I am sensitive to this since this has blocked me inside restrictive employers from using some packages.
timelyportfolio
Jul 17, 2019
•
Contributor
I added in develop branch 469f620. @tim-salabim, please let me know if you encountered any challenges with this replacement in mapview. Thanks.
I added in develop branch 469f620. @tim-salabim, please let me know if you encountered any challenges with this replacement in mapview. Thanks.
timelyportfolio
Jul 17, 2019
Contributor
actually @tim-salabim @JoshOBrien this should be only match FALSE exactly so I changed in bb5e7c9#diff-ad5b576355b0f070a49b21f08b1c27ffR14. sorry.
actually @tim-salabim @JoshOBrien this should be only match FALSE exactly so I changed in bb5e7c9#diff-ad5b576355b0f070a49b21f08b1c27ffR14. sorry.
|
@JoshOBrien @tim-salabim I have merged #98 and this pull into Sorry for the very long delay. This is not how I anticipate operating going forward. |
|
@tim-salabim will you please test |
|
@tim-salabim I ran CRAN-checks and everything passes except for #102. |
|
@timelyportfolio. I just arrived in the us. Will try to find some time to test this week. |
|
@JoshOBrien looks like force push closed this pull request. Was this intentional? If you made changes I will try to add into |
|
Oops. No, not intentional, so please disregard.
…On Mon, Jul 22, 2019, 05:10 timelyportfolio ***@***.***> wrote:
@JoshOBrien <https://github.com/JoshOBrien> looks like force push closed
this pull request. Was this intentional? If you made changes I will try to
add into develop.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#100?email_source=notifications&email_token=AA2RGJNPGXKR3AUUX2W5HUDQAWPRZA5CNFSM4HUERFFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2PW4IQ#issuecomment-513764898>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2RGJNH25SA5KAPW5EOAZ3QAWPRZANCNFSM4HUERFFA>
.
|
|
@timelyportfolio I've had a test run. The only thing I fund missing is that the new Thanks guys for this awesome addition!! |
The new
editorOptions=argument takes a user-supplied list of named options that are ultimately passed on to eitherleafpm::addPmToolbar()orleaflet.extras::addDrawToolbar(), depending on the value of theeditor=argument. (This addresses #92 and incorporates suggestions made in the discussion resulting from #97)When
editor = "leafpm", the list can consist of one or more elements with names"toolbarOptions","drawOptions","editOptions", and"cutOptions". For details, see?leafpm::addPmToolbar.When
editor = "leaflet.extras", allowable names for list elements are"polylineOptions,"polygonOptions","circleOptions","rectangleOptions","makerOptions","circleMarkerOptions", and"editOptions". For details, see?leaflet.extras::addDrawToolbar.Currently, there is no checking or validation of the list passed in to
editorOptions=, so users will need to take particular care that the list's structure (including the names of all of its elements) matchwith what is expected by the
leafpm::addPmToolbar()orleaflet.extras::addDrawToolbar()functions.Here are few simple examples demonstrating the new argument's usage: