1

Code :

$scope.$on('leafletDirectiveMap.click', function(event, locationEvent){
    $scope.newLocation = new Location();
    $scope.newLocation.lat = locationEvent.leafletEvent.latlng.lat;
    $scope.newLocation.lng = locationEvent.leafletEvent.latlng.lng;
    $scope.modal.show();
  });

Above code shows popup, with current lat & long of user. But click event works only once, until next reload.

Divyam Solanki
  • 461
  • 2
  • 7
  • 25

0 Answers0