{"action":"created","issue":{"url":"https://api.github.com/repos/navermaps/maps.js/issues/201","repository_url":"https://api.github.com/repos/navermaps/maps.js","labels_url":"https://api.github.com/repos/navermaps/maps.js/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/navermaps/maps.js/issues/201/comments","events_url":"https://api.github.com/repos/navermaps/maps.js/issues/201/events","html_url":"https://github.com/navermaps/maps.js/issues/201","id":248281370,"number":201,"title":"heatmap redraw관련 다시 문의 드립니다","user":{"login":"kihoon76","id":25476360,"avatar_url":"https://avatars1.githubusercontent.com/u/25476360?v=4","gravatar_id":"","url":"https://api.github.com/users/kihoon76","html_url":"https://github.com/kihoon76","followers_url":"https://api.github.com/users/kihoon76/followers","following_url":"https://api.github.com/users/kihoon76/following{/other_user}","gists_url":"https://api.github.com/users/kihoon76/gists{/gist_id}","starred_url":"https://api.github.com/users/kihoon76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kihoon76/subscriptions","organizations_url":"https://api.github.com/users/kihoon76/orgs","repos_url":"https://api.github.com/users/kihoon76/repos","events_url":"https://api.github.com/users/kihoon76/events{/privacy}","received_events_url":"https://api.github.com/users/kihoon76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-08-07T00:11:19Z","updated_at":"2017-08-15T03:18:41Z","closed_at":null,"body":"답변감사합니다.\r\n제가 정확히 하려는 것을 말씀드리겠습니다\r\n위에서 예를 든것과 동일하다고 생각이 듭니다(초기 data옵션이 null이면 스크립트 오류가 발생하고 빈 배열을 넣어주면 오류 발생하지 않습니다)\r\n처음에 로딩될때 화면에 보이눈 bounds안에만 heatmap을 그리고 마우스 dragend 이벤트 발생시 새로보이는 부분을 그리려고 합니다\r\nheatmap에 뿌릴 데이터를 배열에 담아놓고 추가되는 부분을 쌓은후 heatmap에 setdata후 redraw를 호출하면 화면에서 다 사라집니다.\r\n또 이상현상은 사라진 화면에서 마우스로 드래그한 상태로 화면 밖으로 나갔다가 들어오면 사라졌던 화면이 보이는데 마우스를 놓으면 또 사라집니다\r\n\r\n그래서 어쩔수 없이 heatmap을 다시 생성해서 그리는데 깜빡임이 발생할 수 밖에 없네요\r\nAPI문서는 너무 간단하게 나오는데 제가 원하는대로 구현이 안되네요\r\n검토부탁 드리겠습니다\r\n감사합니다 "},"comment":{"url":"https://api.github.com/repos/navermaps/maps.js/issues/comments/322366908","html_url":"https://github.com/navermaps/maps.js/issues/201#issuecomment-322366908","issue_url":"https://api.github.com/repos/navermaps/maps.js/issues/201","id":322366908,"user":{"login":"kihoon76","id":25476360,"avatar_url":"https://avatars1.githubusercontent.com/u/25476360?v=4","gravatar_id":"","url":"https://api.github.com/users/kihoon76","html_url":"https://github.com/kihoon76","followers_url":"https://api.github.com/users/kihoon76/followers","following_url":"https://api.github.com/users/kihoon76/following{/other_user}","gists_url":"https://api.github.com/users/kihoon76/gists{/gist_id}","starred_url":"https://api.github.com/users/kihoon76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kihoon76/subscriptions","organizations_url":"https://api.github.com/users/kihoon76/orgs","repos_url":"https://api.github.com/users/kihoon76/repos","events_url":"https://api.github.com/users/kihoon76/events{/privacy}","received_events_url":"https://api.github.com/users/kihoon76/received_events","type":"User","site_admin":false},"created_at":"2017-08-15T03:18:41Z","updated_at":"2017-08-15T03:18:41Z","body":"\n    \n감사합니다\n\n\n내 삼성 디바이스에서 보냈습니다\n\n-------- 원본 메시지 --------\n발신: Yonghwan Lee <notifications@github.com> \n날짜: 17/8/14  오전 11:49  (GMT+09:00) \n받은 사람: \"navermaps/maps.js\" <maps.js@noreply.github.com> \n참조: kihoon76 <lovedeer118@gmail.com>, Mention <mention@noreply.github.com> \n제목: Re: [navermaps/maps.js] heatmap redraw관련 다시 문의 드립니다 (#201) \n\n@kihoon76 님, 좌표 경계 내에 있는 좌표에 대해 히트맵을 그리는 예제입니다. 그리고 현재는 옵션에서 inReverse를 설정할 수 없습니다.\nvar heatmap = new naver.maps.visualization.HeatMap({\n  data: [],\n  map: map\n});\n\nvar drawHeatMap = function() {\n  var zoom = map.getZoom(),\n      dataWithinBounds = [];\n\n  if (zoom >= 5) {\n    var bounds = map.getBounds(),\n        data = heatmapPosition.filter(function(v) {\n          return bounds.hasLatLng(v);\n        });\n\n\n    if (data && data.length > 0) {\n      dataWithinBounds = data;\n    }\n  }\n\n  heatmap.setData(dataWithinBounds);\n  heatmap.redraw();\n};\n\ndrawHeatMap();\n\nnaver.maps.Event.addListener(map, 'idle', function() {\n  drawHeatMap();\n});\n\n\n—\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub, or mute the thread.\n\n\n  \n  \n\n\n\n\n{\"api_version\":\"1.0\",\"publisher\":{\"api_key\":\"05dde50f1d1a384dd78767c55493e4bb\",\"name\":\"GitHub\"},\"entity\":{\"external_key\":\"github/navermaps/maps.js\",\"title\":\"navermaps/maps.js\",\"subtitle\":\"GitHub repository\",\"main_image_url\":\"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png\",\"avatar_image_url\":\"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png\",\"action\":{\"name\":\"Open in GitHub\",\"url\":\"https://github.com/navermaps/maps.js\"}},\"updates\":{\"snippets\":[{\"icon\":\"PERSON\",\"message\":\"@thetaiz in #201: @kihoon76 님, 좌표 경계 내에 있는 좌표에 대해 히트맵을 그리는 예제입니다. 그리고 현재는 옵션에서 `inReverse`를 설정할 수 없습니다.\\r\\n\\r\\n```\\r\\nvar heatmap = new naver.maps.visualization.HeatMap({\\r\\n  data: [],\\r\\n  map: map\\r\\n});\\r\\n\\r\\nvar drawHeatMap = function() {\\r\\n  var zoom = map.getZoom(),\\r\\n      dataWithinBounds = [];\\r\\n\\r\\n  if (zoom \\u003e= 5) {\\r\\n    var bounds = map.getBounds(),\\r\\n        data = heatmapPosition.filter(function(v) {\\r\\n          return bounds.hasLatLng(v);\\r\\n        });\\r\\n\\r\\n\\r\\n    if (data \\u0026\\u0026 data.length \\u003e 0) {\\r\\n      dataWithinBounds = data;\\r\\n    }\\r\\n  }\\r\\n\\r\\n  heatmap.setData(dataWithinBounds);\\r\\n  heatmap.redraw();\\r\\n};\\r\\n\\r\\ndrawHeatMap();\\r\\n\\r\\nnaver.maps.Event.addListener(map, 'idle', function() {\\r\\n  drawHeatMap();\\r\\n});\\r\\n```\"}],\"action\":{\"name\":\"View Issue\",\"url\":\"https://github.com/navermaps/maps.js/issues/201#issuecomment-322088693\"}}}"}}
{"actor":{"display_login":"kihoon76"}}