Skip to content

Commit

Permalink
Add clearGeoJSON method
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed Dec 17, 2014
1 parent a7af644 commit 33efb48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/leaflet.R
Expand Up @@ -67,12 +67,12 @@ createLeafletMap <- function(session, outputId) {
stub(addMarker(lat, lng, layerId=NULL, options=list(), eachOptions=list())),
stub(addCircleMarker(lat, lng, radius, layerId = NULL, options = list(), eachOptions=list())),
stub(clearMarkers()),
stub(clearShapes()),
stub(fitBounds(lat1, lng1, lat2, lng2)),
stub(addCircle(lat, lng, radius, layerId = NULL, options=list(), eachOptions=list())),
stub(addRectangle(lat1, lng1, lat2, lng2, layerId = NULL, options=list(), eachOptions=list())),
stub(addPolygon(lat, lng, layerId, options, defaultOptions)),
stub(addGeoJSON(data, layerId)),
stub(clearGeoJSON()),
stub(showPopup(lat, lng, content, layerId = NULL, options=list())),
stub(removePopup(layerId)),
stub(clearPopups()),
Expand Down
4 changes: 4 additions & 0 deletions inst/www/binding.js
Expand Up @@ -295,6 +295,10 @@ var dataframe = (function() {
this.shapes.clear();
};

methods.clearGeoJSON = function() {
this.geojson.clear();
};

methods.fitBounds = function(lat1, lng1, lat2, lng2) {
this.fitBounds([
[lat1, lng1], [lat2, lng2]
Expand Down

0 comments on commit 33efb48

Please sign in to comment.