Skip to content

Commit

Permalink
Merge pull request #53 from jduss4/removeAllMarkers
Browse files Browse the repository at this point in the history
fixes onRemove so all markers are removed
  • Loading branch information
dwilhelm89 authored Aug 24, 2017
2 parents 9b01d11 + 6b50440 commit cc52caa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SliderControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ L.Control.SliderControl = L.Control.extend({

onRemove: function (map) {
//Delete all markers which where added via the slider and remove the slider div
for (i = this.options.minValue; i < this.options.maxValue; i++) {
for (i = this.options.minValue; i <= this.options.maxValue; i++) {
map.removeLayer(this.options.markers[i]);
}
$('#leaflet-slider').remove();
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet.SliderControl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc52caa

Please sign in to comment.