{"action":"opened","issue":{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/1020","labels_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/1020/labels{/name}","comments_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/1020/comments","events_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/1020/events","html_url":"https://github.com/tombatossals/angular-leaflet-directive/issues/1020","id":116290720,"number":1020,"title":"Marker Update - Too Slow","user":{"login":"guchan","id":9340400,"avatar_url":"https://avatars.githubusercontent.com/u/9340400?v=3","gravatar_id":"","url":"https://api.github.com/users/guchan","html_url":"https://github.com/guchan","followers_url":"https://api.github.com/users/guchan/followers","following_url":"https://api.github.com/users/guchan/following{/other_user}","gists_url":"https://api.github.com/users/guchan/gists{/gist_id}","starred_url":"https://api.github.com/users/guchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guchan/subscriptions","organizations_url":"https://api.github.com/users/guchan/orgs","repos_url":"https://api.github.com/users/guchan/repos","events_url":"https://api.github.com/users/guchan/events{/privacy}","received_events_url":"https://api.github.com/users/guchan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-11T08:46:40Z","updated_at":"2015-11-11T08:46:40Z","closed_at":null,"body":"Hi, I am new to leaflet-directive. I am trying to update the markers dynamically a) with show/hide buttons b) with real time data. In both cases I am trying to update markers in a function like this: \r\n$scope.marker[\"some_id\"] = {lat: .... lng:... } and to delete I simply use $scope.marker[\"some_id\"] = {}\r\n\r\nHowever, this simple update takes too long, 1-2sec. I don't know if I am doing something wrong or this is the normal behavior  ? \r\n\r\n<code>\r\n $scope.drawMapVehicles = function(){\r\n    $scope.markers = {};\r\n    angular.forEach($scope.vehicles, function(vehicle, vehicle_key){        \r\n        $scope.markers[vehicle.vehicle.id] = \r\n            {\r\n                lat:parseFloat(vehicle.trips[0].trip.attributes.EndLat),\r\n                lng:parseFloat(vehicle.trips[0].trip.attributes.EndLon),\r\n                draggable: false         \r\n            }\r\n\r\n    });\r\n    \r\n}\r\n </code>\r\n\r\nThanks!"}}