Skip to content

Instantly share code, notes, and snippets.

@ungoldman
Created July 24, 2013 22:14
Show Gist options
  • Save ungoldman/6075109 to your computer and use it in GitHub Desktop.
Save ungoldman/6075109 to your computer and use it in GitHub Desktop.
how to override a leaflet method
L.Tooltip.prototype.updatePosition = function(latlng) {
var pos = this._map.latLngToLayerPoint(latlng);
L.DomUtil.setPosition(this._container, pos);
this._container.style.display = 'inline-block';
console.log('doing something');
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment