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

sometimes popups on polylines don't open #1029

Open azoletwork opened 8 years ago

azoletwork commented 8 years ago

Hi,

I am facing an odd behaviour on popups opening over polylines on mouse interaction. Here is a basic example fiddle, and here is the way to reproduce the issue:

Notice that I'm using Leaflet v0.7.5, and the latest directive version here and that I use Google Chrome 44 on Linux (Kubuntu).

Also notice that the same example with Leaflet (and no directives) works.

Shawn-Fan commented 8 years ago

try it, to see if it works

var app = angular.module('demoapp',['leaflet-directive']);

app.controller('DemoController', [ '$scope', 'leafletData', function($scope, leafletData) { angular.extend($scope, { center: { lat: 51.505, lng: -0.09, zoom: 4 }, paths: { p1: { color: 'red', weight: 8, latlngs: [ { lat: 51.50, lng: -0.082 }, { lat: 48.83, lng: 2.37 }, { lat: 41.91, lng: 12.48 } ], message: "

Route from London to Rome

Distance: 1862km

", }, p2: { color: 'green', weight: 8, latlngs: [ { lat: 48.2083537, lng: 16.3725042 }, { lat: 48.8534, lng: 2.3485 } ], message: "

Route from Vienna to Paris

Distance: 1211km

" } } }) }]);

azoletwork commented 8 years ago

@Shawn-Fan sorry, I don't get the difference between your code above and my fiddle.

azoletwork commented 8 years ago

Did anyone else try to reproduce this issue?

srthurman commented 8 years ago

I'm getting the same effect you're talking about when I run the JSFiddle. I haven't look at it in depth, but I notice you're using leaflet 0.6.x, while angular leaflet depends on leaflet 0.7.x. Try switching that out.

azoletwork commented 8 years ago

@srthurman Thanks, switched it now to 0.7.5, but still same effect.