{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6463","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-js","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6463/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6463/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6463/events","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/6463","id":311923078,"number":6463,"title":"Heatmap density calculation","user":{"login":"fighterii","id":16879286,"avatar_url":"https://avatars2.githubusercontent.com/u/16879286?v=4","gravatar_id":"","url":"https://api.github.com/users/fighterii","html_url":"https://github.com/fighterii","followers_url":"https://api.github.com/users/fighterii/followers","following_url":"https://api.github.com/users/fighterii/following{/other_user}","gists_url":"https://api.github.com/users/fighterii/gists{/gist_id}","starred_url":"https://api.github.com/users/fighterii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fighterii/subscriptions","organizations_url":"https://api.github.com/users/fighterii/orgs","repos_url":"https://api.github.com/users/fighterii/repos","events_url":"https://api.github.com/users/fighterii/events{/privacy}","received_events_url":"https://api.github.com/users/fighterii/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-06T10:18:36Z","updated_at":"2018-04-06T11:38:58Z","closed_at":"2018-04-06T10:57:49Z","author_association":"NONE","body":"<!--\r\nHello! Thanks for contributing. \r\n\r\nIf you are reporting a bug, please:\r\n - Make the issue title a succinct but specific description of the unexpected behavior. Bad: \"Map rotation is broken\". Good: \"map.setBearing(...) throws a TypeError for negative values\"\r\n - Include a link to a minimal demonstration of the bug. We recommend using https://jsbin.com\r\n - Ensure you can reproduce the bug using the latest release.\r\n - Check the console for relevant errors and warnings\r\n - Only post to report a bug or request a feature. Direct all other questions to https://stackoverflow.com/questions/tagged/mapbox-gl-js\r\n \r\nIf you are requesting a new feature or suggesting a big change, please:\r\n - Copy the Mapbox GL RFC template into this ticket and fill out as much as you can https://raw.githubusercontent.com/mapbox/mapbox-gl-js/master/RFC_TEMPLATE.md\r\n - Make the issue title a succinct but specific description of your use case or the desired functionality. Bad: \"More clustering options\". Good: \"Compute and expose aggregated values when clustering GeoJSON\".\r\n - If a change to shaders or the style specification is required, clearly mark the issue as a cross-platform issue so that this project’s maintainers know to apply the “cross platform” label.\r\n-->\r\n\r\n**mapbox-gl-js version**: v0.44.2\r\n\r\n### Steps to Trigger Behavior\r\n\r\n 1. https://jsfiddle.net/vw046awm/6/\r\n 2. 10 points at the same spot; 5 points at an other spot\r\n 3. No Clustering\r\n\r\n### Expected Behavior\r\n- 10 points => maximum amount of points => no weight / intensity scaling => density: 1 \r\nresulting in an heatmap circle of color  \"rgb(178,24,43)\" (dark red)\r\n- 5 points => half of the maximum amount of points => no weight / intensity scaling => density: 0.5\r\nresulting in an heatmap circle of color between  0.4, \"rgb(209,229,240)\" and 0.6, \"rgb(253,219,199)\" (somewhere between light green and rose)\r\n\r\n### Actual Behavior\r\n- Both spots have the same color (the one assigned to a density of 1 \"rgb(178,24,43)\" (dark red))\r\n\r\nAm i missing something here? Am i missunderstanding how a heatmap should work and calculate the density?\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/379228147","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/6463#issuecomment-379228147","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/6463","id":379228147,"user":{"login":"fighterii","id":16879286,"avatar_url":"https://avatars2.githubusercontent.com/u/16879286?v=4","gravatar_id":"","url":"https://api.github.com/users/fighterii","html_url":"https://github.com/fighterii","followers_url":"https://api.github.com/users/fighterii/followers","following_url":"https://api.github.com/users/fighterii/following{/other_user}","gists_url":"https://api.github.com/users/fighterii/gists{/gist_id}","starred_url":"https://api.github.com/users/fighterii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fighterii/subscriptions","organizations_url":"https://api.github.com/users/fighterii/orgs","repos_url":"https://api.github.com/users/fighterii/repos","events_url":"https://api.github.com/users/fighterii/events{/privacy}","received_events_url":"https://api.github.com/users/fighterii/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T11:38:58Z","updated_at":"2018-04-06T11:38:58Z","author_association":"NONE","body":"@mourner But as explained in my edit, i think the density stays a \"1\" as a maximum? https://jsfiddle.net/vw046awm/10/ A color which is assigned to densities above 1 is never painted. \r\nSo two spots with a difference of 100% in point_count both get a density of 1? \r\n\r\nI don't want to say you are not right and maybe the heatmap feature works as designed, but i have a hard time to understand whats going on under the hood here. And i can't understand why the heatmap is designed to work in this way (which benefit would you have from making two very different spots look alike)."}}
{"actor":{"display_login":"fighterii"}}