{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1293","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1293/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1293/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1293/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1293","id":70274064,"number":1293,"title":"Map centers to infoWindow on Marker Close","user":{"login":"nolandubeau","id":458553,"avatar_url":"https://avatars.githubusercontent.com/u/458553?v=3","gravatar_id":"","url":"https://api.github.com/users/nolandubeau","html_url":"https://github.com/nolandubeau","followers_url":"https://api.github.com/users/nolandubeau/followers","following_url":"https://api.github.com/users/nolandubeau/following{/other_user}","gists_url":"https://api.github.com/users/nolandubeau/gists{/gist_id}","starred_url":"https://api.github.com/users/nolandubeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolandubeau/subscriptions","organizations_url":"https://api.github.com/users/nolandubeau/orgs","repos_url":"https://api.github.com/users/nolandubeau/repos","events_url":"https://api.github.com/users/nolandubeau/events{/privacy}","received_events_url":"https://api.github.com/users/nolandubeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-23T01:11:11Z","updated_at":"2015-04-27T14:15:28Z","closed_at":null,"body":"Hi,\r\n\r\nI am noticing strange inconsistent behaviour when displaying markers with ng-repeat vs the model approach.  See the following snippets: \r\n\r\n///// ng-repeat\r\n <ui-gmap-marker ng-repeat=\"m in alertMarkers\" coords=\"m\" icon=\"m.icon\" click=\"onMarkerClicked(m)\" doCluster=\"map.cluster\" idKey=\"m.id\" options=\"m.options\">\r\n                <ui-gmap-window ng-cloak>\r\n                    <div>\r\n                        <p class=\"fs-subhead\">{{m.info.event}}</p>\r\n                        <p>Sender: {{m.info.senderName}}</p>\r\n                        <p>Coordinates: {{ m.latitude | number:4 }}, {{ m.longitude | number:4 }}!</p>\r\n                    </div>\r\n                </ui-gmap-window>\r\n            </ui-gmap-marker>\r\n\r\n\r\n///// models\r\n           <ui-gmap-markers models=\"alertMarkers\" coords=\"'self'\" icon=\"'icon'\" click=\"onMarkerClicked\" doCluster=\"map.cluster\">\r\n    <ui-gmap-windows show=\"'showWindow'\" ng-cloak doRebuildAll=\"false\">\r\n        <div>\r\n            <p ng-non-bindable class=\"fs-subhead\">{{info.event}}</p>\r\n            <p ng-non-bindable>Sender: {{info.senderName}}</p>\r\n            <p ng-non-bindable>Coordinates: {{ latitude | number:4 }}, {{ longitude | number:4 }}!</p>\r\n        </div>\r\n    </ui-gmap-windows>\r\n</ui-gmap-markers>\r\n\r\nLet's say I have two markers in the alertMarkers array, and both infoWindows are open.  One marker is in Montreal, and one marker in Toronto.\r\n\r\nWhen using the models approach if I close the marker in Montreal, the map automatically centers/focuses to the marker/infoWindow in Toronto.\r\n\r\nIf I replace the models code with the ng-repeat approach, the above does not happen.  If I close the infoWindow in Montreal, the map stays in the current position.  This is the behaviour that I want to achieve with the models approach, and I would prefer to use the models approach for performance reasons.\r\n\r\nIs there a way to prevent this behaviour when using the models approach?\r\n\r\nOn a side note, it appears that the doCluster option does not work when using ng-repeat.\r\n\r\nThanks!\r\n\r\nNolan\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/96670586","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1293#issuecomment-96670586","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1293","id":96670586,"user":{"login":"gitnik","id":996623,"avatar_url":"https://avatars.githubusercontent.com/u/996623?v=3","gravatar_id":"","url":"https://api.github.com/users/gitnik","html_url":"https://github.com/gitnik","followers_url":"https://api.github.com/users/gitnik/followers","following_url":"https://api.github.com/users/gitnik/following{/other_user}","gists_url":"https://api.github.com/users/gitnik/gists{/gist_id}","starred_url":"https://api.github.com/users/gitnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitnik/subscriptions","organizations_url":"https://api.github.com/users/gitnik/orgs","repos_url":"https://api.github.com/users/gitnik/repos","events_url":"https://api.github.com/users/gitnik/events{/privacy}","received_events_url":"https://api.github.com/users/gitnik/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T14:15:28Z","updated_at":"2015-04-27T14:15:28Z","body":"1. Don't use ng-repeat with markers\r\n2. Create a plunker"}}