{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/178852923","pull_request_review_id":108983158,"id":178852923,"diff_hunk":"@@ -451,6 +453,30 @@ void Processor::SearchCoordinates()\n   m_emitter.Emit();\n }\n \n+void Processor::SearchPlusCode()\n+{\n+  string code;\n+  if (openlocationcode::IsFull(m_query))\n+  {\n+    code = m_query;\n+  }\n+  else if (openlocationcode::IsShort(m_query))\n+  {\n+    if (GetPosition().IsAlmostZero())\n+      return;\n+    ms::LatLon const & latLon = MercatorBounds::ToLatLon(GetPosition());\n+    code = openlocationcode::RecoverNearest(m_query, {latLon.lat, latLon.lon});\n+  }\n+  if (!code.empty())\n+  {\n+    openlocationcode::CodeArea result = openlocationcode::Decode(code);\n+    m_emitter.AddResultNoChecks(\n+        m_ranker.MakeResult(RankerResult(result.GetCenter().latitude, result.GetCenter().longitude),\n+                            true /* needAddress */, true /* needHighlighting */));","path":"search/processor.cpp","position":null,"original_position":39,"commit_id":"1b919bf0fd5542b55cf22fbb98ba8ad06b26ade8","original_commit_id":"f84b3ae6d649ff1a92c9d3ed8acdc3d08b1dae36","user":{"login":"mpimenov","id":10366009,"avatar_url":"https://avatars0.githubusercontent.com/u/10366009?v=4","gravatar_id":"","url":"https://api.github.com/users/mpimenov","html_url":"https://github.com/mpimenov","followers_url":"https://api.github.com/users/mpimenov/followers","following_url":"https://api.github.com/users/mpimenov/following{/other_user}","gists_url":"https://api.github.com/users/mpimenov/gists{/gist_id}","starred_url":"https://api.github.com/users/mpimenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpimenov/subscriptions","organizations_url":"https://api.github.com/users/mpimenov/orgs","repos_url":"https://api.github.com/users/mpimenov/repos","events_url":"https://api.github.com/users/mpimenov/events{/privacy}","received_events_url":"https://api.github.com/users/mpimenov/received_events","type":"User","site_admin":false},"body":"The result of SearchCoordinates() (and of SearchPlusCode, I think) is a pair of coordinates which we highlight because it matches what the user typed. I'm not even sure we have to highlight it there. But here you don't want to highlight a digit in the coordinate because it matches a digit in the plus code, do you?","created_at":"2018-04-03T14:54:13Z","updated_at":"2018-04-03T14:54:14Z","html_url":"https://github.com/mapsme/omim/pull/8426#discussion_r178852923","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/8426","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/178852923"},"html":{"href":"https://github.com/mapsme/omim/pull/8426#discussion_r178852923"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8426"}},"in_reply_to_id":178849539},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/8426","id":179121414,"html_url":"https://github.com/mapsme/omim/pull/8426","diff_url":"https://github.com/mapsme/omim/pull/8426.diff","patch_url":"https://github.com/mapsme/omim/pull/8426.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/8426","number":8426,"state":"open","locked":false,"title":"[search] Support searching over Plus Codes","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars1.githubusercontent.com/u/766031?v=4","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"body":"В строке поиска можно будет ввести код типа `9G7VQGWQ+V4` или его сокращённый вариант `QGWQ+V4` (при условии, что вьюпорт в Москве) и сразу получить результат, наше здание в этом случае.\r\n\r\nЗадействует опенсорсную гугловскую библиотеку. [Плюс-коды](https://plus.codes/) полностью открыты и поддерживаются в приложении Google Maps.","created_at":"2018-04-03T14:43:28Z","updated_at":"2018-04-03T14:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8772ad11fd63f4aaebe5dc9163f48bce580a250f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rokuz","id":5437220,"avatar_url":"https://avatars1.githubusercontent.com/u/5437220?v=4","gravatar_id":"","url":"https://api.github.com/users/rokuz","html_url":"https://github.com/rokuz","followers_url":"https://api.github.com/users/rokuz/followers","following_url":"https://api.github.com/users/rokuz/following{/other_user}","gists_url":"https://api.github.com/users/rokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/rokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokuz/subscriptions","organizations_url":"https://api.github.com/users/rokuz/orgs","repos_url":"https://api.github.com/users/rokuz/repos","events_url":"https://api.github.com/users/rokuz/events{/privacy}","received_events_url":"https://api.github.com/users/rokuz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/8426/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/8426/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/8426/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/1b919bf0fd5542b55cf22fbb98ba8ad06b26ade8","head":{"label":"Zverik:plus_codes","ref":"plus_codes","sha":"1b919bf0fd5542b55cf22fbb98ba8ad06b26ade8","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars1.githubusercontent.com/u/766031?v=4","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"repo":{"id":43427426,"name":"omim","full_name":"Zverik/omim","owner":{"login":"Zverik","id":766031,"avatar_url":"https://avatars1.githubusercontent.com/u/766031?v=4","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zverik/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/Zverik/omim","forks_url":"https://api.github.com/repos/Zverik/omim/forks","keys_url":"https://api.github.com/repos/Zverik/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zverik/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zverik/omim/teams","hooks_url":"https://api.github.com/repos/Zverik/omim/hooks","issue_events_url":"https://api.github.com/repos/Zverik/omim/issues/events{/number}","events_url":"https://api.github.com/repos/Zverik/omim/events","assignees_url":"https://api.github.com/repos/Zverik/omim/assignees{/user}","branches_url":"https://api.github.com/repos/Zverik/omim/branches{/branch}","tags_url":"https://api.github.com/repos/Zverik/omim/tags","blobs_url":"https://api.github.com/repos/Zverik/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zverik/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zverik/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zverik/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zverik/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/Zverik/omim/languages","stargazers_url":"https://api.github.com/repos/Zverik/omim/stargazers","contributors_url":"https://api.github.com/repos/Zverik/omim/contributors","subscribers_url":"https://api.github.com/repos/Zverik/omim/subscribers","subscription_url":"https://api.github.com/repos/Zverik/omim/subscription","commits_url":"https://api.github.com/repos/Zverik/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zverik/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zverik/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zverik/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zverik/omim/contents/{+path}","compare_url":"https://api.github.com/repos/Zverik/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zverik/omim/merges","archive_url":"https://api.github.com/repos/Zverik/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zverik/omim/downloads","issues_url":"https://api.github.com/repos/Zverik/omim/issues{/number}","pulls_url":"https://api.github.com/repos/Zverik/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/Zverik/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/Zverik/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zverik/omim/labels{/name}","releases_url":"https://api.github.com/repos/Zverik/omim/releases{/id}","deployments_url":"https://api.github.com/repos/Zverik/omim/deployments","created_at":"2015-09-30T10:43:06Z","updated_at":"2017-06-01T12:48:29Z","pushed_at":"2018-04-03T14:54:12Z","git_url":"git://github.com/Zverik/omim.git","ssh_url":"git@github.com:Zverik/omim.git","clone_url":"https://github.com/Zverik/omim.git","svn_url":"https://github.com/Zverik/omim","homepage":null,"size":3528892,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"f76abf201cda99075d6e05f95e8b35848b0d1e19","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars1.githubusercontent.com/u/14185141?v=4","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars1.githubusercontent.com/u/14185141?v=4","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2018-04-03T13:43:51Z","pushed_at":"2018-04-03T14:54:14Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":3683419,"stargazers_count":2632,"watchers_count":2632,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":571,"mirror_url":null,"archived":false,"open_issues_count":663,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":571,"open_issues":663,"watchers":2632,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8426"},"html":{"href":"https://github.com/mapsme/omim/pull/8426"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/8426"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/8426/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8426/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8426/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/1b919bf0fd5542b55cf22fbb98ba8ad06b26ade8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mpimenov"}}