javascript - angular-google-maps not updating markers -


i using library angular-google-maps not appear updating markers when push or remove markers markers array demonstrated in plnker below. console shows new marker has been added while not reflected on map.

http://plnkr.co/edit/si5tanvbu8fro14oc4ny?p=preview

$scope.addplace = function() {         $scope.places.push({         id: 3,         latitude: 42,         longitude: -79       });        console.log($scope.places);    }; 

you need set modelsbyref false in ui-gmap-markers directives

 <ui-gmap-markers models="places" coords="'self'" modelsbyref="false">       </ui-gmap-markers> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -