{"action":"created","comment":{"url":"https://api.github.com/repos/2gis/mapsapi/pulls/comments/66432328","id":66432328,"diff_hunk":"@@ -42,27 +42,48 @@ DG.Poi = DG.Handler.extend({\n     },\n \n     _processData : function (data, coord) {\n-        var map = this._map,\n-            tileOriginPoint = coord.scaleBy(this._metaLayer.getTileSize());\n+        var tileOriginPoint = coord.scaleBy(this._metaLayer.getTileSize());\n+        var polygonLngLatToPoints = DG.bind(this._polygonLngLatToPoints, this, tileOriginPoint);\n \n         if (data.responseText === '') {\n             return [];\n         }\n \n-        return data.result.poi.map(function (item) {\n-            var geoJson = DG.Wkt.toGeoJSON(item.hover);\n+        return data.result.poi\n+            .map(function (item) {\n+                return {\n+                    id: item.id,\n+                    hint: item.links[0].name,\n+                    linked: item.links[0],\n+                    geometry: DG.Wkt.toGeoJSON(item.hover)\n+                };\n+            })\n+            .filter(function (item) {\n+                return item.geometry.type == 'Polygon' ||\n+                    item.geometry.type == 'MultiPolygon';\n+            })\n+            .map(function (item) {\n+                var geoJson = item.geometry;\n+\n+                if (geoJson.type == 'Polygon') {\n+                    geoJson.coordinates = polygonLngLatToPoints(geoJson.coordinates);\n+                } else if (geoJson.type == 'MultiPolygon') {\n+                    geoJson.coordinates = geoJson.coordinates.map(polygonLngLatToPoints);\n+                }\n+\n+                return item;\n+            });\n+    },\n+\n+    _polygonLngLatToPoints: function (originPoint, polygon) {","path":"src/DGPoi/src/DGPoi.js","position":41,"original_position":41,"commit_id":"dbf96f5e1ceaa165cdd026b8290af82c57e87fe2","original_commit_id":"5e62d76c280b4972ceefe896c4b4307edfe3814c","user":{"login":"RLRR","id":4540062,"avatar_url":"https://avatars.githubusercontent.com/u/4540062?v=3","gravatar_id":"","url":"https://api.github.com/users/RLRR","html_url":"https://github.com/RLRR","followers_url":"https://api.github.com/users/RLRR/followers","following_url":"https://api.github.com/users/RLRR/following{/other_user}","gists_url":"https://api.github.com/users/RLRR/gists{/gist_id}","starred_url":"https://api.github.com/users/RLRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLRR/subscriptions","organizations_url":"https://api.github.com/users/RLRR/orgs","repos_url":"https://api.github.com/users/RLRR/repos","events_url":"https://api.github.com/users/RLRR/events{/privacy}","received_events_url":"https://api.github.com/users/RLRR/received_events","type":"User","site_admin":false},"body":"Окай","created_at":"2016-06-09T12:37:54Z","updated_at":"2016-06-09T12:37:54Z","html_url":"https://github.com/2gis/mapsapi/pull/357#discussion_r66432328","pull_request_url":"https://api.github.com/repos/2gis/mapsapi/pulls/357","_links":{"self":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/comments/66432328"},"html":{"href":"https://github.com/2gis/mapsapi/pull/357#discussion_r66432328"},"pull_request":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/357"}}},"pull_request":{"url":"https://api.github.com/repos/2gis/mapsapi/pulls/357","id":73193052,"html_url":"https://github.com/2gis/mapsapi/pull/357","diff_url":"https://github.com/2gis/mapsapi/pull/357.diff","patch_url":"https://github.com/2gis/mapsapi/pull/357.patch","issue_url":"https://api.github.com/repos/2gis/mapsapi/issues/357","number":357,"state":"open","locked":false,"title":"Support multipolygons in meta layers","user":{"login":"Trufi","id":3996552,"avatar_url":"https://avatars.githubusercontent.com/u/3996552?v=3","gravatar_id":"","url":"https://api.github.com/users/Trufi","html_url":"https://github.com/Trufi","followers_url":"https://api.github.com/users/Trufi/followers","following_url":"https://api.github.com/users/Trufi/following{/other_user}","gists_url":"https://api.github.com/users/Trufi/gists{/gist_id}","starred_url":"https://api.github.com/users/Trufi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trufi/subscriptions","organizations_url":"https://api.github.com/users/Trufi/orgs","repos_url":"https://api.github.com/users/Trufi/repos","events_url":"https://api.github.com/users/Trufi/events{/privacy}","received_events_url":"https://api.github.com/users/Trufi/received_events","type":"User","site_admin":false},"body":"* Добавил поддержку `MultiPolygon` в данных пои.\r\n* Вынес код отвечающий за расчет попадания точки в полигон в `PolyUtil.inside`.\r\n* Старый метод `PolyUtil.contains` выпилил.","created_at":"2016-06-09T10:49:09Z","updated_at":"2016-06-09T12:37:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9082aa5de3fd58074478fea7459f337df4bf697d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/2gis/mapsapi/pulls/357/commits","review_comments_url":"https://api.github.com/repos/2gis/mapsapi/pulls/357/comments","review_comment_url":"https://api.github.com/repos/2gis/mapsapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2gis/mapsapi/issues/357/comments","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/dbf96f5e1ceaa165cdd026b8290af82c57e87fe2","head":{"label":"2gis:support-multipolygons-in-poi","ref":"support-multipolygons-in-poi","sha":"dbf96f5e1ceaa165cdd026b8290af82c57e87fe2","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":8050444,"name":"mapsapi","full_name":"2gis/mapsapi","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/mapsapi","description":"Карты 2ГИС — это точные данные обо всех объектах города, включая новостройки, с детализацией до заборов и внутриквартальных проездов.","fork":false,"url":"https://api.github.com/repos/2gis/mapsapi","forks_url":"https://api.github.com/repos/2gis/mapsapi/forks","keys_url":"https://api.github.com/repos/2gis/mapsapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/mapsapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/mapsapi/teams","hooks_url":"https://api.github.com/repos/2gis/mapsapi/hooks","issue_events_url":"https://api.github.com/repos/2gis/mapsapi/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/mapsapi/events","assignees_url":"https://api.github.com/repos/2gis/mapsapi/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/mapsapi/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/mapsapi/tags","blobs_url":"https://api.github.com/repos/2gis/mapsapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/mapsapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/mapsapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/mapsapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/mapsapi/languages","stargazers_url":"https://api.github.com/repos/2gis/mapsapi/stargazers","contributors_url":"https://api.github.com/repos/2gis/mapsapi/contributors","subscribers_url":"https://api.github.com/repos/2gis/mapsapi/subscribers","subscription_url":"https://api.github.com/repos/2gis/mapsapi/subscription","commits_url":"https://api.github.com/repos/2gis/mapsapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/mapsapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/mapsapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/mapsapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/mapsapi/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/mapsapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/mapsapi/merges","archive_url":"https://api.github.com/repos/2gis/mapsapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/mapsapi/downloads","issues_url":"https://api.github.com/repos/2gis/mapsapi/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/mapsapi/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/mapsapi/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/mapsapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/mapsapi/labels{/name}","releases_url":"https://api.github.com/repos/2gis/mapsapi/releases{/id}","deployments_url":"https://api.github.com/repos/2gis/mapsapi/deployments","created_at":"2013-02-06T11:59:11Z","updated_at":"2016-05-12T09:13:52Z","pushed_at":"2016-06-09T12:09:26Z","git_url":"git://github.com/2gis/mapsapi.git","ssh_url":"git@github.com:2gis/mapsapi.git","clone_url":"https://github.com/2gis/mapsapi.git","svn_url":"https://github.com/2gis/mapsapi","homepage":"","size":16895,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":33,"forks":2,"open_issues":33,"watchers":78,"default_branch":"master"}},"base":{"label":"2gis:master","ref":"master","sha":"7c9871230c885a3dfc1047fbde352125b46e2d1d","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":8050444,"name":"mapsapi","full_name":"2gis/mapsapi","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/mapsapi","description":"Карты 2ГИС — это точные данные обо всех объектах города, включая новостройки, с детализацией до заборов и внутриквартальных проездов.","fork":false,"url":"https://api.github.com/repos/2gis/mapsapi","forks_url":"https://api.github.com/repos/2gis/mapsapi/forks","keys_url":"https://api.github.com/repos/2gis/mapsapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/mapsapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/mapsapi/teams","hooks_url":"https://api.github.com/repos/2gis/mapsapi/hooks","issue_events_url":"https://api.github.com/repos/2gis/mapsapi/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/mapsapi/events","assignees_url":"https://api.github.com/repos/2gis/mapsapi/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/mapsapi/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/mapsapi/tags","blobs_url":"https://api.github.com/repos/2gis/mapsapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/mapsapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/mapsapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/mapsapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/mapsapi/languages","stargazers_url":"https://api.github.com/repos/2gis/mapsapi/stargazers","contributors_url":"https://api.github.com/repos/2gis/mapsapi/contributors","subscribers_url":"https://api.github.com/repos/2gis/mapsapi/subscribers","subscription_url":"https://api.github.com/repos/2gis/mapsapi/subscription","commits_url":"https://api.github.com/repos/2gis/mapsapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/mapsapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/mapsapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/mapsapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/mapsapi/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/mapsapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/mapsapi/merges","archive_url":"https://api.github.com/repos/2gis/mapsapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/mapsapi/downloads","issues_url":"https://api.github.com/repos/2gis/mapsapi/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/mapsapi/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/mapsapi/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/mapsapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/mapsapi/labels{/name}","releases_url":"https://api.github.com/repos/2gis/mapsapi/releases{/id}","deployments_url":"https://api.github.com/repos/2gis/mapsapi/deployments","created_at":"2013-02-06T11:59:11Z","updated_at":"2016-05-12T09:13:52Z","pushed_at":"2016-06-09T12:09:26Z","git_url":"git://github.com/2gis/mapsapi.git","ssh_url":"git@github.com:2gis/mapsapi.git","clone_url":"https://github.com/2gis/mapsapi.git","svn_url":"https://github.com/2gis/mapsapi","homepage":"","size":16895,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":33,"forks":2,"open_issues":33,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/357"},"html":{"href":"https://github.com/2gis/mapsapi/pull/357"},"issue":{"href":"https://api.github.com/repos/2gis/mapsapi/issues/357"},"comments":{"href":"https://api.github.com/repos/2gis/mapsapi/issues/357/comments"},"review_comments":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/357/comments"},"review_comment":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/357/commits"},"statuses":{"href":"https://api.github.com/repos/2gis/mapsapi/statuses/dbf96f5e1ceaa165cdd026b8290af82c57e87fe2"}}}}
{"actor":{"display_login":"RLRR"}}