Skip to content

Instantly share code, notes, and snippets.

@martsie
Created July 20, 2017 01:18
Show Gist options
  • Save martsie/a8987d03e991c15ec43cb66a35bae712 to your computer and use it in GitHub Desktop.
Save martsie/a8987d03e991c15ec43cb66a35bae712 to your computer and use it in GitHub Desktop.
Update auto positioned leaflet tooltips on map pan
leafletElement.eachLayer(function(layer) {
// Re-render tooltips that have automatic positioning on map pan events.
if(layer.options.direction && layer.options.direction === 'auto') {
layer.update();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment