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 637 forks source link

Breaking changes from 0.7.11 -> 0.7.15 #748

Closed MarkAPhillips closed 9 years ago

MarkAPhillips commented 9 years ago

A few suggestion and comments. When I upgraded the version to the latest version - markers on the map are no longer being displayed. This occurred on my build process as I was using ~0.7.11 in my bower.json file so therefore the latest version of the directive was downloaded. I therefore changed this to refer to the exact version 0.7.11 and the markers appeared again. Therefore can I suggest that if any builds contain major breaking changes that the version is upped to 0.8.x and list any breaking changes that have occurred as its difficult to determine what the exact issue is otherwise.

Also please can you advise as to why markers would no longer appear - I am using the marker cluster javascript plugin for Leaflet and the code uses your example - what do you think could have changed to cause the markers to no longer appear.

I have had to upgrade as I was getting issues drawing paths between markers as no polyline was being drawn again based on your example. Could this be an issue with the CSS ?

Any help appreciated. I will try other versions in the meantime to see where the issue arose and let you know of any outcome.

MarkAPhillips commented 9 years ago

It seems to have occurred in version 0.7.12 so will investigate what changes occurred in this release.

MarkAPhillips commented 9 years ago

$scope.markers is being set correctly but no markers appear on the map. I have reverted back to 0.7.11 currently until I have time to investigate it further. I assume it must be something either to do with the markercluster plugin or changes you have made in relation to markers over the last month.

MarkAPhillips commented 9 years ago

OK resolved it after a bit more research

previously I had

<leaflet center="center" markers="markers" event-broadcast="events" 
layers="layers"  watch-markers="no" height="600" width="100%"></leaflet>

which always loaded the markers - on upgrading the markers were no longer being watched and therefore had to change to the following

<leaflet center="center" markers="markers" event-broadcast="events" 
layers="layers" watch-markers="true" height="600" width="100%"></leaflet>

therefore marker watch behaviour changed in version 0.7.12

j-r-t commented 9 years ago

yep there was an issue regarding this here https://github.com/tombatossals/angular-leaflet-directive/issues/548 which is basically anything in watch-markers was true - if I'm reading yours correctly?

Does this sound like the same issue?

MarkAPhillips commented 9 years ago

I think now the default is false unless you explicitly set it to true whereas previously the default was more than likely true - I am not sure where I got watch-markers=no as it was not working previously from the look of it anyway.