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

leaflet 1.0 beta issues with map object #1046

Open dkuzhanov opened 8 years ago

dkuzhanov commented 8 years ago

Hi guys,

I was playing around with the latest Leaflet 1.0.2 beta release and ran into some issues with map object. I was wondering if someone had experienced something similar.

I have a map and I try to add canvas layer on top of it and draw some basic shapes. It works perfectly fine with the latest stable version. I simply replace leaflet v 7.6 with 1.0 and get an error saying "map.AddLayer(CanvasLayer)', 'map.AddLayer' is undefined". Is there some workaround for that?

Thanks! DK

PS: I know it may be a bit too early to try to use it with ALD but I wanted to try out some new canvas features.

thatcatcancode commented 8 years ago

hi @dkuzhanov - can you reproduce using plunkr or jsfiddle so we can see what you're talking about?

dkuzhanov commented 8 years ago

Hi @thatgirlcancode,

Thanks for your reply. Unfortunately, I couldn't put together jsfiddle or plunkr (as my project is very clumsy). However, I managed to add new leaflet beta to my project and create two rawgit links.

Stable leaflet version: https://rawgit.com/dkuzhanov/Mapable/master/www/index.html beta https://rawgit.com/dkuzhanov/Mapable/master/www/index%20copy.html

When debugging the second one you can see that function(map) {_layer.addTo(map)} at controllers.js file line 500 becomes undefined and when I try to change and force add that layer I get "map.AddLayer(CanvasLayer)', 'map.AddLayer' is undefined".

thanks, DK