{"action":"created","issue":{"url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/157","labels_url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/157/comments","events_url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/157/events","html_url":"https://github.com/allenhwkim/angularjs-google-maps/issues/157","id":60262793,"number":157,"title":"Change in ng-repeat model should delete existing shapes","user":{"login":"mohammadjavadkho","id":6248003,"avatar_url":"https://avatars.githubusercontent.com/u/6248003?v=3","gravatar_id":"","url":"https://api.github.com/users/mohammadjavadkho","html_url":"https://github.com/mohammadjavadkho","followers_url":"https://api.github.com/users/mohammadjavadkho/followers","following_url":"https://api.github.com/users/mohammadjavadkho/following{/other_user}","gists_url":"https://api.github.com/users/mohammadjavadkho/gists{/gist_id}","starred_url":"https://api.github.com/users/mohammadjavadkho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohammadjavadkho/subscriptions","organizations_url":"https://api.github.com/users/mohammadjavadkho/orgs","repos_url":"https://api.github.com/users/mohammadjavadkho/repos","events_url":"https://api.github.com/users/mohammadjavadkho/events{/privacy}","received_events_url":"https://api.github.com/users/mohammadjavadkho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-08T16:02:04Z","updated_at":"2015-03-08T20:24:11Z","closed_at":null,"body":"Change in ng-repeat model does not  delete existing shapes!!"},"comment":{"url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/comments/77772053","html_url":"https://github.com/allenhwkim/angularjs-google-maps/issues/157#issuecomment-77772053","issue_url":"https://api.github.com/repos/allenhwkim/angularjs-google-maps/issues/157","id":77772053,"user":{"login":"allenhwkim","id":1437734,"avatar_url":"https://avatars.githubusercontent.com/u/1437734?v=3","gravatar_id":"","url":"https://api.github.com/users/allenhwkim","html_url":"https://github.com/allenhwkim","followers_url":"https://api.github.com/users/allenhwkim/followers","following_url":"https://api.github.com/users/allenhwkim/following{/other_user}","gists_url":"https://api.github.com/users/allenhwkim/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhwkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhwkim/subscriptions","organizations_url":"https://api.github.com/users/allenhwkim/orgs","repos_url":"https://api.github.com/users/allenhwkim/repos","events_url":"https://api.github.com/users/allenhwkim/events{/privacy}","received_events_url":"https://api.github.com/users/allenhwkim/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T20:24:11Z","updated_at":"2015-03-08T20:24:11Z","body":"Thanks for using this module\r\n\r\nCan you change app/scripts/directive/shape.js with destroy callback that are used by app/scripts/directives/marker.js\r\n\r\n      /**\r\n       * set event to clean up removed marker\r\n       * useful with ng-repeat\r\n       */\r\n      element.bind('$destroy', function() {\r\n        var markers = marker.map.markers;\r\n        for (var name in markers) {\r\n          if (markers[name] == marker) {\r\n            delete markers[name];\r\n          }\r\n        }\r\n        marker.setMap(null);          \r\n      });\r\n\r\n"}}