{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1197","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1197/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1197/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1197/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1197","id":59685364,"number":1197,"title":"Improve performance with markers","user":{"login":"hgodoy","id":10659393,"avatar_url":"https://avatars.githubusercontent.com/u/10659393?v=3","gravatar_id":"","url":"https://api.github.com/users/hgodoy","html_url":"https://github.com/hgodoy","followers_url":"https://api.github.com/users/hgodoy/followers","following_url":"https://api.github.com/users/hgodoy/following{/other_user}","gists_url":"https://api.github.com/users/hgodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/hgodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgodoy/subscriptions","organizations_url":"https://api.github.com/users/hgodoy/orgs","repos_url":"https://api.github.com/users/hgodoy/repos","events_url":"https://api.github.com/users/hgodoy/events{/privacy}","received_events_url":"https://api.github.com/users/hgodoy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-03T18:39:31Z","updated_at":"2015-08-26T21:13:52Z","closed_at":"2015-03-03T19:53:12Z","body":"Before all thanks for this great directive.\r\nI need to add about 5000 markers to a map. I tried with less markers (about 2000) and it works better but passing that quantity using the map (zoom, move, scroll, ...) it becomes really slow. Is anything I can do?\r\nHere is the code:\r\n```\r\nvar markers = [];\r\n\t//loop array that contains data and location\r\n\tfor(var i=0; i< $scope.clientes.length; i++){\r\n\t\tmarkers.push(crearMarcador(i));\r\n\t}\r\n//create marker\r\n\tvar crearMarcador = function(i){\r\n\t\tvar marker = {\r\n\t\t\t\tid: i,\r\n\t\t\t\tidKey: \"id\",\r\n\t\t\t\tlatitude: $scope.clientes[i].latitud,\r\n\t\t\t\tlongitude: $scope.clientes[i].longitud,\r\n\t\t\t\tshow: false,\r\n\t\t\t\ttitle: \"<strong>Cod: </strong>\" + $scope.clientes[i].codcliente +\r\n\t            \t\t\"<br><strong>Nombre: </strong>\" + $scope.clientes[i].razonsocial + \"<br><strong>Direccion: </strong>\" + $scope.clientes[i].direccion\r\n\t\t\t};\r\n\t\t\t\r\n\t\tmarker.onClicked = function(){\r\n\t\t\tmarker.show = true;\r\n\t\t\tconsole.log('open: ' +  marker.show + ' title: ' + marker.title);\r\n\t\t    $scope.$apply();\r\n\t\t};\r\n\t\t\t\t\r\n\t\tmarker.closeClick = function () {\r\n\t\t    marker.show = false;\r\n\t\t    console.log('close: ' +  marker.show);\r\n\t        $scope.$apply();\r\n\t\t};\r\n\t\treturn marker;\r\n\t};\r\n```\r\n\r\nAnd the page:\r\n```\r\n<ui-gmap-google-map center='map.center' zoom='map.zoom' control=\"map.control\">\r\n\t<ui-gmap-markers models=\"marcadores\" coords=\"'self'\" icon=\"'icon'\" click=\"'onClicked'\" >\r\n\t\t<ui-gmap-windows show=\"show\" closeClick=\"'closeClick'\">\r\n\t\t\t<p ng-non-bindable>{{title}}</p>\r\n\t\t</ui-gmap-windows>\r\n    </ui-gmap-markers>\r\n</ui-gmap-google-map>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/135172048","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1197#issuecomment-135172048","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1197","id":135172048,"user":{"login":"renege","id":2900069,"avatar_url":"https://avatars.githubusercontent.com/u/2900069?v=3","gravatar_id":"","url":"https://api.github.com/users/renege","html_url":"https://github.com/renege","followers_url":"https://api.github.com/users/renege/followers","following_url":"https://api.github.com/users/renege/following{/other_user}","gists_url":"https://api.github.com/users/renege/gists{/gist_id}","starred_url":"https://api.github.com/users/renege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renege/subscriptions","organizations_url":"https://api.github.com/users/renege/orgs","repos_url":"https://api.github.com/users/renege/repos","events_url":"https://api.github.com/users/renege/events{/privacy}","received_events_url":"https://api.github.com/users/renege/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T21:13:52Z","updated_at":"2015-08-26T21:13:52Z","body":"@nmccready that example is broken, can't see the output. but thanks anyways, i figured it out! loads much faster.\r\n\r\nisn't there a good example somewhere? with marker with ```<ui-gmap-window>```?"}}