{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/28073210","id":28073210,"diff_hunk":"@@ -208,36 +270,87 @@ define(function (require) {\n      * @method shadedCircleMarkers\n      * @param map {Object}\n      * @param mapData {Object}\n-     * @return {undefined}\n+     * @return {Leaflet object} featureLayer\n      */\n     TileMap.prototype.shadedCircleMarkers = function (map, mapData) {\n       var self = this;\n \n-      // TODO: add UI to select local min max or all min max\n+      // super min and max from all chart data\n+      var min = mapData.properties.allmin;\n+      var max = mapData.properties.allmax;\n \n-      // min and max from chart data for this map\n-      // var min = mapData.properties.min;\n-      // var max = mapData.properties.max;\n+      var featureLayer = L.geoJson(mapData, {\n+        pointToLayer: function (feature, latlng) {\n+          var count = feature.properties.count;\n+          var radius = self.geohashMinDistance(feature);\n+          return L.circle(latlng, radius);\n+        },\n+        onEachFeature: function (feature, layer) {\n+          self.bindPopup(feature, layer);\n+        },\n+        style: function (feature) {\n+          var count = feature.properties.count;\n+          var color = self.quantizeColorScale(count, min, max);\n+          return {\n+            fillColor: color,\n+            color: self.darkerColor(color),\n+            weight: 1.0,\n+            opacity: 1,\n+            fillOpacity: 0.75\n+          };\n+        }\n+      });\n+\n+      // add legend\n+      if (mapData.features.length > 1) {\n+        self.addLegend(mapData, map);\n+      }\n+\n+      return featureLayer;\n+    };\n+\n+    /**\n+     * Type of data overlay for map:\n+     * creates featurelayer from mapData (geoJson)\n+     * with rectangles that show the geohash grid bounds\n+     *\n+     * @method geohashGrid\n+     * @param map {Object}\n+     * @param mapData {Object}\n+     * @return {undefined}\n+     */\n+    TileMap.prototype.shadedGeohashGrid = function (map, mapData) {\n+      var self = this;\n \n       // super min and max from all chart data\n       var min = mapData.properties.allmin;\n       var max = mapData.properties.allmax;\n \n-      var length = mapData.properties.length;\n-      var precision = mapData.properties.precision;\n-      var zoomScale = self.zoomScale(mapZoom);\n       var bounds;\n-      var defaultColor = '#005baa';\n+\n       var featureLayer = L.geoJson(mapData, {\n         pointToLayer: function (feature, latlng) {\n           var count = feature.properties.count;","path":"src/kibana/components/vislib/visualizations/tile_map.js","position":360,"original_position":360,"commit_id":"5d9d2c208c2f57c750a74449cc9199e7e82ec1ad","original_commit_id":"5d9d2c208c2f57c750a74449cc9199e7e82ec1ad","user":{"login":"panda01","id":549944,"avatar_url":"https://avatars.githubusercontent.com/u/549944?v=3","gravatar_id":"","url":"https://api.github.com/users/panda01","html_url":"https://github.com/panda01","followers_url":"https://api.github.com/users/panda01/followers","following_url":"https://api.github.com/users/panda01/following{/other_user}","gists_url":"https://api.github.com/users/panda01/gists{/gist_id}","starred_url":"https://api.github.com/users/panda01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panda01/subscriptions","organizations_url":"https://api.github.com/users/panda01/orgs","repos_url":"https://api.github.com/users/panda01/repos","events_url":"https://api.github.com/users/panda01/events{/privacy}","received_events_url":"https://api.github.com/users/panda01/received_events","type":"User","site_admin":false},"body":"The var `count` is the variable I'm referring to here.","created_at":"2015-04-09T15:37:54Z","updated_at":"2015-04-09T15:37:54Z","html_url":"https://github.com/elastic/kibana/pull/3445#discussion_r28073210","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/3445","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/28073210"},"html":{"href":"https://github.com/elastic/kibana/pull/3445#discussion_r28073210"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3445"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/3445","id":31878627,"html_url":"https://github.com/elastic/kibana/pull/3445","diff_url":"https://github.com/elastic/kibana/pull/3445.diff","patch_url":"https://github.com/elastic/kibana/pull/3445.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/3445","number":3445,"state":"open","locked":false,"title":"Tilemap refactor","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":"Includes several 'low-hanging fruit' updates:\r\n- changed map min zoom to 1 and max zoom to 18, closes #3160\r\n- simplified code by removing a few methods\r\n- eliminated redraw of circle markers on map zoom by using distance instead of pixels\r\n- improved sizing of circles by using geohash grid min distance of rect, closes #2370, closes #3159 \r\n- added a couple of map types to the view options: geohash grid rectangles, pins, closes #3158\r\n- added shading to the default scaled circles in order to add a legend for this type\r\n- added tests, closes #1917","created_at":"2015-03-24T22:57:01Z","updated_at":"2015-04-09T15:37:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5e45fb95a46d40ce038b490985c19b483a2741b","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/3445/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/3445/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/3445/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/5d9d2c208c2f57c750a74449cc9199e7e82ec1ad","head":{"label":"jthomassie:tilemap-refactor","ref":"tilemap-refactor","sha":"5d9d2c208c2f57c750a74449cc9199e7e82ec1ad","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-08T14:32:32Z","pushed_at":"2015-04-08T14:49:38Z","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":49750,"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":"d52b026bec1fe1abb3a702a9219bcfdb451d6802","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-09T15:07:43Z","pushed_at":"2015-04-09T14:42:15Z","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":69523,"stargazers_count":3351,"watchers_count":3351,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1260,"mirror_url":null,"open_issues_count":451,"forks":1260,"open_issues":451,"watchers":3351,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3445"},"html":{"href":"https://github.com/elastic/kibana/pull/3445"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/3445"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/3445/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3445/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/3445/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/5d9d2c208c2f57c750a74449cc9199e7e82ec1ad"}}}}