tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 635 forks source link

Open popup programatically #1061

Open 3ynm opened 8 years ago

3ynm commented 8 years ago

I'm trying to open popup on drop, but it does not work, I've tried with

$scope.$on('leafletDirectiveMarker.dragend', function(event,args){
   args.model.focus = true;
});

and

$scope.$on('leafletDirectiveMarker.dragend', function(event,args){
    $scope.markers.forEach(function(marker){
        marker.focus = false;
    });
});
args.model.focus = true;

But popup does not open until I drag and drop the marker for second time. Here how this should work

That's not how it should work, how can I achieve this?