{"action":"created","comment":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/89212122","pull_request_review_id":9758097,"id":89212122,"diff_hunk":"@@ -311,6 +322,38 @@ void setCurrentThreadPriority(int priority) {\n     setpriority(PRIO_PROCESS, tid, priority);\n }\n \n+void labelsPickCallback(jobject listener, const std::vector<Tangram::TouchLabel>& labels) {\n+\n+    JniThreadBinding jniEnv(jvm);\n+\n+    float position[2] = {0.0, 0.0};\n+\n+    jobject touchLabel = nullptr;\n+\n+    if (labels.size() > 0) {\n+        auto label = labels[0];\n+        auto properties = label.touchItem.properties;\n+\n+        position[0] = label.touchItem.position[0];\n+        position[1] = label.touchItem.position[1];\n+\n+        jobject hashmap = jniEnv->NewObject(hashmapClass, hashmapInitMID);\n+\n+        for (const auto& item : properties->items()) {\n+            jstring jkey = jniEnv->NewStringUTF(item.key.c_str());\n+            jstring jvalue = jniEnv->NewStringUTF(properties->asString(item.value).c_str());\n+            jniEnv->CallObjectMethod(hashmap, hashmapPutMID, jkey, jvalue);\n+        }\n+\n+        jdoubleArray darr = jniEnv->NewDoubleArray(2);\n+        jniEnv->SetDoubleArrayRegion(darr, 0, 2, reinterpret_cast<jdouble*>(&label.coordinate));","path":"android/tangram/jni/platform_android.cpp","position":54,"original_position":54,"commit_id":"485bd686d4c2efc36872360e13d732306fb865dc","original_commit_id":"485bd686d4c2efc36872360e13d732306fb865dc","user":{"login":"blair1618","id":3371850,"avatar_url":"https://avatars.githubusercontent.com/u/3371850?v=3","gravatar_id":"","url":"https://api.github.com/users/blair1618","html_url":"https://github.com/blair1618","followers_url":"https://api.github.com/users/blair1618/followers","following_url":"https://api.github.com/users/blair1618/following{/other_user}","gists_url":"https://api.github.com/users/blair1618/gists{/gist_id}","starred_url":"https://api.github.com/users/blair1618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blair1618/subscriptions","organizations_url":"https://api.github.com/users/blair1618/orgs","repos_url":"https://api.github.com/users/blair1618/repos","events_url":"https://api.github.com/users/blair1618/events{/privacy}","received_events_url":"https://api.github.com/users/blair1618/received_events","type":"User","site_admin":false},"body":"Probably easier to just use 2 double arguments here rather than instantiate an array.","created_at":"2016-11-22T21:18:14Z","updated_at":"2016-11-22T21:52:02Z","html_url":"https://github.com/tangrams/tangram-es/pull/1076#discussion_r89212122","pull_request_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076","_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/89212122"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/1076#discussion_r89212122"},"pull_request":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076"}}},"pull_request":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076","id":93028635,"html_url":"https://github.com/tangrams/tangram-es/pull/1076","diff_url":"https://github.com/tangrams/tangram-es/pull/1076.diff","patch_url":"https://github.com/tangrams/tangram-es/pull/1076.patch","issue_url":"https://api.github.com/repos/tangrams/tangram-es/issues/1076","number":1076,"state":"open","locked":false,"title":"More infos for label feature selection","user":{"login":"karimnaaji","id":7061573,"avatar_url":"https://avatars.githubusercontent.com/u/7061573?v=3","gravatar_id":"","url":"https://api.github.com/users/karimnaaji","html_url":"https://github.com/karimnaaji","followers_url":"https://api.github.com/users/karimnaaji/followers","following_url":"https://api.github.com/users/karimnaaji/following{/other_user}","gists_url":"https://api.github.com/users/karimnaaji/gists{/gist_id}","starred_url":"https://api.github.com/users/karimnaaji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimnaaji/subscriptions","organizations_url":"https://api.github.com/users/karimnaaji/orgs","repos_url":"https://api.github.com/users/karimnaaji/repos","events_url":"https://api.github.com/users/karimnaaji/events{/privacy}","received_events_url":"https://api.github.com/users/karimnaaji/received_events","type":"User","site_admin":false},"body":"Add interface to get more infos when selecting POIs/Icons and text labels.\r\n\r\nGeneric feature selection makes it hard to adjust a marker on top of an icon since the interface returns back the screen position of the created feature selection query. Putting a marker at this  position makes it nearly impossible to add a marker sticking to an existing label on screen.\r\n\r\nThis PR adds the set of touched label created for that feature with their corresponding lat/lon.\r\n\r\nExample:\r\n\r\nSelecting any of the point or text in this POI:\r\n<img width=\"207\" alt=\"screen shot 2016-11-09 at 2 52 22 pm\" src=\"https://cloud.githubusercontent.com/assets/7061573/20152446/40c365c6-a68c-11e6-998c-8345c4961064.png\">\r\n\r\nReturns:\r\n<img width=\"582\" alt=\"screen shot 2016-11-09 at 2 52 36 pm\" src=\"https://cloud.githubusercontent.com/assets/7061573/20152456/4bee5e1a-a68c-11e6-893c-5d130a8e3849.png\">\r\n\r\ncc @sarahlensing @ecgreb for the Android interface.\r\n\r\nTODO:\r\n- [x] JNI bindings\r\n- [x] Treat line labels","created_at":"2016-11-09T19:59:02Z","updated_at":"2016-11-22T21:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"013292b385e07b7947830e74b258fcd1389bbf3c","assignee":{"login":"ecgreb","id":464123,"avatar_url":"https://avatars.githubusercontent.com/u/464123?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgreb","html_url":"https://github.com/ecgreb","followers_url":"https://api.github.com/users/ecgreb/followers","following_url":"https://api.github.com/users/ecgreb/following{/other_user}","gists_url":"https://api.github.com/users/ecgreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgreb/subscriptions","organizations_url":"https://api.github.com/users/ecgreb/orgs","repos_url":"https://api.github.com/users/ecgreb/repos","events_url":"https://api.github.com/users/ecgreb/events{/privacy}","received_events_url":"https://api.github.com/users/ecgreb/received_events","type":"User","site_admin":false},"assignees":[{"login":"ecgreb","id":464123,"avatar_url":"https://avatars.githubusercontent.com/u/464123?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgreb","html_url":"https://github.com/ecgreb","followers_url":"https://api.github.com/users/ecgreb/followers","following_url":"https://api.github.com/users/ecgreb/following{/other_user}","gists_url":"https://api.github.com/users/ecgreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgreb/subscriptions","organizations_url":"https://api.github.com/users/ecgreb/orgs","repos_url":"https://api.github.com/users/ecgreb/repos","events_url":"https://api.github.com/users/ecgreb/events{/privacy}","received_events_url":"https://api.github.com/users/ecgreb/received_events","type":"User","site_admin":false},{"login":"sarahlensing","id":494323,"avatar_url":"https://avatars.githubusercontent.com/u/494323?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahlensing","html_url":"https://github.com/sarahlensing","followers_url":"https://api.github.com/users/sarahlensing/followers","following_url":"https://api.github.com/users/sarahlensing/following{/other_user}","gists_url":"https://api.github.com/users/sarahlensing/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahlensing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahlensing/subscriptions","organizations_url":"https://api.github.com/users/sarahlensing/orgs","repos_url":"https://api.github.com/users/sarahlensing/repos","events_url":"https://api.github.com/users/sarahlensing/events{/privacy}","received_events_url":"https://api.github.com/users/sarahlensing/received_events","type":"User","site_admin":false},{"login":"blair1618","id":3371850,"avatar_url":"https://avatars.githubusercontent.com/u/3371850?v=3","gravatar_id":"","url":"https://api.github.com/users/blair1618","html_url":"https://github.com/blair1618","followers_url":"https://api.github.com/users/blair1618/followers","following_url":"https://api.github.com/users/blair1618/following{/other_user}","gists_url":"https://api.github.com/users/blair1618/gists{/gist_id}","starred_url":"https://api.github.com/users/blair1618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blair1618/subscriptions","organizations_url":"https://api.github.com/users/blair1618/orgs","repos_url":"https://api.github.com/users/blair1618/repos","events_url":"https://api.github.com/users/blair1618/events{/privacy}","received_events_url":"https://api.github.com/users/blair1618/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076/commits","review_comments_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076/comments","review_comment_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/issues/1076/comments","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/485bd686d4c2efc36872360e13d732306fb865dc","head":{"label":"tangrams:feature-selection-label-infos","ref":"feature-selection-label-infos","sha":"485bd686d4c2efc36872360e13d732306fb865dc","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","deployments_url":"https://api.github.com/repos/tangrams/tangram-es/deployments","created_at":"2014-08-27T13:56:56Z","updated_at":"2016-11-18T09:37:04Z","pushed_at":"2016-11-22T20:32:33Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":41935,"stargazers_count":191,"watchers_count":191,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":109,"forks":68,"open_issues":109,"watchers":191,"default_branch":"master"}},"base":{"label":"tangrams:master","ref":"master","sha":"617816badf05e02e0b53211401fae86300b4bc49","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","deployments_url":"https://api.github.com/repos/tangrams/tangram-es/deployments","created_at":"2014-08-27T13:56:56Z","updated_at":"2016-11-18T09:37:04Z","pushed_at":"2016-11-22T20:32:33Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":41935,"stargazers_count":191,"watchers_count":191,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":109,"forks":68,"open_issues":109,"watchers":191,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/1076"},"issue":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/1076"},"comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/1076/comments"},"review_comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076/comments"},"review_comment":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/1076/commits"},"statuses":{"href":"https://api.github.com/repos/tangrams/tangram-es/statuses/485bd686d4c2efc36872360e13d732306fb865dc"}}}}
{"actor":{"display_login":"blair1618"}}