Skip to content

Commit

Permalink
Merge pull request shramov#12 from alno/distance-fix
Browse files Browse the repository at this point in the history
Use map from property, not global
  • Loading branch information
shramov committed May 29, 2012
2 parents dc840b0 + 7a19b5b commit 0b577e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control/Distance.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ L.Control.Distance = L.Control.extend({
},

_calc_enable: function() {
map.on('click', this._add_point, this);
this._map.on('click', this._add_point, this);

this._map.getContainer().style.cursor = 'crosshair';
this._map.addLayer(this._line);
Expand Down

0 comments on commit 0b577e2

Please sign in to comment.