Open nmccready opened 8 years ago
From @seadour on March 5, 2015 20:26
Hi fbrandel,
Have you tried using the leafletData service to access the map object?
See related comment here: https://github.com/tombatossals/angular-leaflet-directive/issues/184#issuecomment-28553932
Inject the service into your controller, then try something like:
leafletData.getMap().then(function(map) {
map.Marker.showLabel();
});
From @fbrandel on February 14, 2015 13:5
The Leaflet.label plugin seems to be supported when creating markers in the directive or even when the label message gets changed. So far so good. Now I wonder if/how it is possible to access the label with its public methods like
showLabel()
orhideLabel()
.This does not seem to work, as once the marker is created, I do not have access to the 'real' L.Marker instance.
Do you have any advice on this?
Thanks.
Copied from original issue: tombatossals/angular-leaflet-directive#632