Skip to content

add leaflet-measure control #171

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

Merged
merged 3 commits into from
Aug 27, 2015
Merged

Conversation

timelyportfolio
Copy link
Contributor

leaflet-measure seemed like a very good and easy addition to leaflet. It adds a control to measure a polygon that a user can draw onto a leaflet map. I tried to model the pull on others that I have seen recently. Please let me know if there are any consistencies.

Here is an example with screenshot.

library(leaflet)

leaf <- leaflet() %>%
  addTiles() %>%
  # central park
  fitBounds(-73.9, 40.75, -73.95,40.8) %>%
  addMeasure()

leaf

# to remove the measure
leaf %>% removeMeasure()

image

this.measureControl.addTo(this);
};

methods.removeMeasure = function(layerId){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for layerId parameter

@jcheng5
Copy link
Member

jcheng5 commented Aug 25, 2015

Other than the comments I made this looks great, thank you!

@timelyportfolio
Copy link
Contributor Author

@jcheng5, very good suggestions. Thanks for the review. I think all changes have been made.

@jcheng5
Copy link
Member

jcheng5 commented Aug 25, 2015

Great! Last thing we need from you is a signed CLA, if you don't mind. https://www.rstudio.com/wp-content/uploads/2014/06/RStudioIndividualContributorAgreement.pdf If scanning isn't convenient, you can just email a cellphone pic of the signed agreement to [email protected].

The CLA assigns copyright to us so we can relicense our package in the future if necessary, e.g. to a different version of the GPL or to a more liberal BSD/MIT style license. (Without having CLAs on file for all contributors, we'd have to try to wrangle a unanimous vote to make these kinds of changes.)

@jcheng5
Copy link
Member

jcheng5 commented Aug 27, 2015

I received the CLA, thank you.

jcheng5 added a commit that referenced this pull request Aug 27, 2015
@jcheng5 jcheng5 merged commit f821a71 into rstudio:master Aug 27, 2015
@timelyportfolio timelyportfolio deleted the feature/measure branch August 27, 2015 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants