{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/29391419","id":29391419,"diff_hunk":"@@ -125,6 +125,46 @@ define(function (require) {\n \n       editableVis.listeners.click = vis.listeners.click = filterBarClickHandler($state);\n       editableVis.listeners.brush = vis.listeners.brush = brushEvent;\n+      editableVis.listeners.mapZoomEnd = vis.listeners.mapZoomEnd = function (event) {\n+        if (!vis.params.autoPrecision) return;\n+\n+        var geoHash = _.find(vis.aggs, function (agg) {\n+          return agg.type.name === 'geohash_grid';\n+        });\n+\n+        geoHash.params.precision = autoPrecision(event.zoom, config.get('visualization:tileMap:maxPrecision'));\n+        $scope.fetch();\n+      };\n+\n+      function autoPrecision(zoom, limit) {\n+        var precision;\n+\n+        // zoomPrecision keys are map zoom, values are geohash precision\n+        // default max precision is 7, configurable up to 12\n+        // limit (max precision) is the max precision value returned\n+        var zoomPrecision = {\n+          1: 1,","path":"src/kibana/plugins/visualize/editor/editor.js","position":31,"original_position":31,"commit_id":"970ba07fe4163941c18b0d892eea95e0d098ec8d","original_commit_id":"970ba07fe4163941c18b0d892eea95e0d098ec8d","user":{"login":"rashidkpc","id":1250387,"avatar_url":"https://avatars.githubusercontent.com/u/1250387?v=3","gravatar_id":"","url":"https://api.github.com/users/rashidkpc","html_url":"https://github.com/rashidkpc","followers_url":"https://api.github.com/users/rashidkpc/followers","following_url":"https://api.github.com/users/rashidkpc/following{/other_user}","gists_url":"https://api.github.com/users/rashidkpc/gists{/gist_id}","starred_url":"https://api.github.com/users/rashidkpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rashidkpc/subscriptions","organizations_url":"https://api.github.com/users/rashidkpc/orgs","repos_url":"https://api.github.com/users/rashidkpc/repos","events_url":"https://api.github.com/users/rashidkpc/events{/privacy}","received_events_url":"https://api.github.com/users/rashidkpc/received_events","type":"User","site_admin":false},"body":"Bump this to 2, it doesn't seem like there's really any performance downside to doing so, and 1 isn't very useful","created_at":"2015-04-29T23:20:49Z","updated_at":"2015-04-29T23:20:49Z","html_url":"https://github.com/elastic/kibana/pull/3713#discussion_r29391419","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/3713","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/29391419"},"html":{"href":"https://github.com/elastic/kibana/pull/3713#discussion_r29391419"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3713"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/3713","id":34395767,"html_url":"https://github.com/elastic/kibana/pull/3713","diff_url":"https://github.com/elastic/kibana/pull/3713.diff","patch_url":"https://github.com/elastic/kibana/pull/3713.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/3713","number":3713,"state":"open","locked":false,"title":"Tilemap zoom precision","user":{"login":"jthomassie","id":209380,"avatar_url":"https://avatars.githubusercontent.com/u/209380?v=3","gravatar_id":"","url":"https://api.github.com/users/jthomassie","html_url":"https://github.com/jthomassie","followers_url":"https://api.github.com/users/jthomassie/followers","following_url":"https://api.github.com/users/jthomassie/following{/other_user}","gists_url":"https://api.github.com/users/jthomassie/gists{/gist_id}","starred_url":"https://api.github.com/users/jthomassie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthomassie/subscriptions","organizations_url":"https://api.github.com/users/jthomassie/orgs","repos_url":"https://api.github.com/users/jthomassie/repos","events_url":"https://api.github.com/users/jthomassie/events{/privacy}","received_events_url":"https://api.github.com/users/jthomassie/received_events","type":"User","site_admin":false},"body":"Added option to change precision as you zoom in on a tile map\r\nCloses #2618, closes #2034.\r\n• added param and input checkbox to agg editor, defaults to true\r\n• hides precision slider if true\r\n• added mapZoomEnd event to dispatch","created_at":"2015-04-29T19:11:50Z","updated_at":"2015-04-29T23:20:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53475d5901a6df40c4ff1ab5279fd05560d309a","assignee":{"login":"rashidkpc","id":1250387,"avatar_url":"https://avatars.githubusercontent.com/u/1250387?v=3","gravatar_id":"","url":"https://api.github.com/users/rashidkpc","html_url":"https://github.com/rashidkpc","followers_url":"https://api.github.com/users/rashidkpc/followers","following_url":"https://api.github.com/users/rashidkpc/following{/other_user}","gists_url":"https://api.github.com/users/rashidkpc/gists{/gist_id}","starred_url":"https://api.github.com/users/rashidkpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rashidkpc/subscriptions","organizations_url":"https://api.github.com/users/rashidkpc/orgs","repos_url":"https://api.github.com/users/rashidkpc/repos","events_url":"https://api.github.com/users/rashidkpc/events{/privacy}","received_events_url":"https://api.github.com/users/rashidkpc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/3713/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/3713/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/3713/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/970ba07fe4163941c18b0d892eea95e0d098ec8d","head":{"label":"jthomassie:tilemap-zoom-precision","ref":"tilemap-zoom-precision","sha":"970ba07fe4163941c18b0d892eea95e0d098ec8d","user":{"login":"jthomassie","id":209380,"avatar_url":"https://avatars.githubusercontent.com/u/209380?v=3","gravatar_id":"","url":"https://api.github.com/users/jthomassie","html_url":"https://github.com/jthomassie","followers_url":"https://api.github.com/users/jthomassie/followers","following_url":"https://api.github.com/users/jthomassie/following{/other_user}","gists_url":"https://api.github.com/users/jthomassie/gists{/gist_id}","starred_url":"https://api.github.com/users/jthomassie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthomassie/subscriptions","organizations_url":"https://api.github.com/users/jthomassie/orgs","repos_url":"https://api.github.com/users/jthomassie/repos","events_url":"https://api.github.com/users/jthomassie/events{/privacy}","received_events_url":"https://api.github.com/users/jthomassie/received_events","type":"User","site_admin":false},"repo":{"id":24915477,"name":"kibana","full_name":"jthomassie/kibana","owner":{"login":"jthomassie","id":209380,"avatar_url":"https://avatars.githubusercontent.com/u/209380?v=3","gravatar_id":"","url":"https://api.github.com/users/jthomassie","html_url":"https://github.com/jthomassie","followers_url":"https://api.github.com/users/jthomassie/followers","following_url":"https://api.github.com/users/jthomassie/following{/other_user}","gists_url":"https://api.github.com/users/jthomassie/gists{/gist_id}","starred_url":"https://api.github.com/users/jthomassie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthomassie/subscriptions","organizations_url":"https://api.github.com/users/jthomassie/orgs","repos_url":"https://api.github.com/users/jthomassie/repos","events_url":"https://api.github.com/users/jthomassie/events{/privacy}","received_events_url":"https://api.github.com/users/jthomassie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jthomassie/kibana","description":"Kibana","fork":true,"url":"https://api.github.com/repos/jthomassie/kibana","forks_url":"https://api.github.com/repos/jthomassie/kibana/forks","keys_url":"https://api.github.com/repos/jthomassie/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jthomassie/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jthomassie/kibana/teams","hooks_url":"https://api.github.com/repos/jthomassie/kibana/hooks","issue_events_url":"https://api.github.com/repos/jthomassie/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/jthomassie/kibana/events","assignees_url":"https://api.github.com/repos/jthomassie/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/jthomassie/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/jthomassie/kibana/tags","blobs_url":"https://api.github.com/repos/jthomassie/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jthomassie/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jthomassie/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/jthomassie/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jthomassie/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/jthomassie/kibana/languages","stargazers_url":"https://api.github.com/repos/jthomassie/kibana/stargazers","contributors_url":"https://api.github.com/repos/jthomassie/kibana/contributors","subscribers_url":"https://api.github.com/repos/jthomassie/kibana/subscribers","subscription_url":"https://api.github.com/repos/jthomassie/kibana/subscription","commits_url":"https://api.github.com/repos/jthomassie/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/jthomassie/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/jthomassie/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/jthomassie/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/jthomassie/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/jthomassie/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jthomassie/kibana/merges","archive_url":"https://api.github.com/repos/jthomassie/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jthomassie/kibana/downloads","issues_url":"https://api.github.com/repos/jthomassie/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/jthomassie/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/jthomassie/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/jthomassie/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jthomassie/kibana/labels{/name}","releases_url":"https://api.github.com/repos/jthomassie/kibana/releases{/id}","created_at":"2014-10-07T23:04:40Z","updated_at":"2015-04-29T22:08:24Z","pushed_at":"2015-04-29T23:01:00Z","git_url":"git://github.com/jthomassie/kibana.git","ssh_url":"git@github.com:jthomassie/kibana.git","clone_url":"https://github.com/jthomassie/kibana.git","svn_url":"https://github.com/jthomassie/kibana","homepage":"http://www.elasticsearch.org/overview/kibana/","size":50479,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"25bea28731faf4bad256c4c85727a1862ae4c820","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":7833168,"name":"kibana","full_name":"elastic/kibana","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/kibana","description":"Kibana","fork":false,"url":"https://api.github.com/repos/elastic/kibana","forks_url":"https://api.github.com/repos/elastic/kibana/forks","keys_url":"https://api.github.com/repos/elastic/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/kibana/teams","hooks_url":"https://api.github.com/repos/elastic/kibana/hooks","issue_events_url":"https://api.github.com/repos/elastic/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/kibana/events","assignees_url":"https://api.github.com/repos/elastic/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/kibana/tags","blobs_url":"https://api.github.com/repos/elastic/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/kibana/languages","stargazers_url":"https://api.github.com/repos/elastic/kibana/stargazers","contributors_url":"https://api.github.com/repos/elastic/kibana/contributors","subscribers_url":"https://api.github.com/repos/elastic/kibana/subscribers","subscription_url":"https://api.github.com/repos/elastic/kibana/subscription","commits_url":"https://api.github.com/repos/elastic/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/kibana/merges","archive_url":"https://api.github.com/repos/elastic/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/kibana/downloads","issues_url":"https://api.github.com/repos/elastic/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/kibana/labels{/name}","releases_url":"https://api.github.com/repos/elastic/kibana/releases{/id}","created_at":"2013-01-26T04:00:59Z","updated_at":"2015-04-29T22:30:49Z","pushed_at":"2015-04-29T23:06:06Z","git_url":"git://github.com/elastic/kibana.git","ssh_url":"git@github.com:elastic/kibana.git","clone_url":"https://github.com/elastic/kibana.git","svn_url":"https://github.com/elastic/kibana","homepage":"https://www.elastic.co/products/kibana","size":72188,"stargazers_count":3463,"watchers_count":3463,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1292,"mirror_url":null,"open_issues_count":460,"forks":1292,"open_issues":460,"watchers":3463,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3713"},"html":{"href":"https://github.com/elastic/kibana/pull/3713"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/3713"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/3713/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3713/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3713/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/970ba07fe4163941c18b0d892eea95e0d098ec8d"}}}}