{"action":"created","comment":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/comments/70478718","id":70478718,"diff_hunk":"@@ -506,6 +508,39 @@ public void fitToElements(boolean animated) {\n         }\n     }\n \n+    public void fitToSuppliedMarkers(ReadableArray markerIDsArray, boolean animated) {\n+        LatLngBounds.Builder builder = new LatLngBounds.Builder();\n+\n+        String[] markerIDs = new String[markerIDsArray.size()];\n+        for (int i = 0; i < markerIDsArray.size(); i++) {\n+            markerIDs[i] = markerIDsArray.getString(i);\n+        }\n+\n+        boolean addedPosition = false;\n+\n+        for (AirMapFeature feature : features) {\n+            if (feature instanceof AirMapMarker) {\n+                String identifier = ((AirMapMarker)feature).getIdentifier();\n+                Marker marker = (Marker)feature.getFeature();\n+                if (Arrays.asList(markerIDs).contains(identifier)) {","path":"android/lib/src/main/java/com/airbnb/android/react/maps/AirMapView.java","position":34,"original_position":34,"commit_id":"a2d66374f5d86ab809126416d253252aeaff23ea","original_commit_id":"a2d66374f5d86ab809126416d253252aeaff23ea","user":{"login":"felipecsl","id":190648,"avatar_url":"https://avatars.githubusercontent.com/u/190648?v=3","gravatar_id":"","url":"https://api.github.com/users/felipecsl","html_url":"https://github.com/felipecsl","followers_url":"https://api.github.com/users/felipecsl/followers","following_url":"https://api.github.com/users/felipecsl/following{/other_user}","gists_url":"https://api.github.com/users/felipecsl/gists{/gist_id}","starred_url":"https://api.github.com/users/felipecsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipecsl/subscriptions","organizations_url":"https://api.github.com/users/felipecsl/orgs","repos_url":"https://api.github.com/users/felipecsl/repos","events_url":"https://api.github.com/users/felipecsl/events{/privacy}","received_events_url":"https://api.github.com/users/felipecsl/received_events","type":"User","site_admin":false},"body":"extract `Arrays.asList(markerIDs)` as a variable outside of the loop so you dont allocate a new array every time","created_at":"2016-07-12T17:06:05Z","updated_at":"2016-07-12T17:06:05Z","html_url":"https://github.com/lelandrichardson/react-native-maps/pull/386#discussion_r70478718","pull_request_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386","_links":{"self":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/comments/70478718"},"html":{"href":"https://github.com/lelandrichardson/react-native-maps/pull/386#discussion_r70478718"},"pull_request":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386"}}},"pull_request":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386","id":77107746,"html_url":"https://github.com/lelandrichardson/react-native-maps/pull/386","diff_url":"https://github.com/lelandrichardson/react-native-maps/pull/386.diff","patch_url":"https://github.com/lelandrichardson/react-native-maps/pull/386.patch","issue_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/386","number":386,"state":"open","locked":false,"title":"Fit to supplied markers","user":{"login":"AidenMontgomery","id":364538,"avatar_url":"https://avatars.githubusercontent.com/u/364538?v=3","gravatar_id":"","url":"https://api.github.com/users/AidenMontgomery","html_url":"https://github.com/AidenMontgomery","followers_url":"https://api.github.com/users/AidenMontgomery/followers","following_url":"https://api.github.com/users/AidenMontgomery/following{/other_user}","gists_url":"https://api.github.com/users/AidenMontgomery/gists{/gist_id}","starred_url":"https://api.github.com/users/AidenMontgomery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AidenMontgomery/subscriptions","organizations_url":"https://api.github.com/users/AidenMontgomery/orgs","repos_url":"https://api.github.com/users/AidenMontgomery/repos","events_url":"https://api.github.com/users/AidenMontgomery/events{/privacy}","received_events_url":"https://api.github.com/users/AidenMontgomery/received_events","type":"User","site_admin":false},"body":"This is a cleaned up version of an earlier pull request, which is based on a more recent fork of the master branch.","created_at":"2016-07-12T12:02:40Z","updated_at":"2016-07-12T17:06:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66d93070fbc07f0e9c5e1539a34a01af9d9ae1b5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386/commits","review_comments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386/comments","review_comment_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/386/comments","statuses_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/statuses/a2d66374f5d86ab809126416d253252aeaff23ea","head":{"label":"ConstructiveCoding:master","ref":"master","sha":"a2d66374f5d86ab809126416d253252aeaff23ea","user":{"login":"ConstructiveCoding","id":395428,"avatar_url":"https://avatars.githubusercontent.com/u/395428?v=3","gravatar_id":"","url":"https://api.github.com/users/ConstructiveCoding","html_url":"https://github.com/ConstructiveCoding","followers_url":"https://api.github.com/users/ConstructiveCoding/followers","following_url":"https://api.github.com/users/ConstructiveCoding/following{/other_user}","gists_url":"https://api.github.com/users/ConstructiveCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ConstructiveCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConstructiveCoding/subscriptions","organizations_url":"https://api.github.com/users/ConstructiveCoding/orgs","repos_url":"https://api.github.com/users/ConstructiveCoding/repos","events_url":"https://api.github.com/users/ConstructiveCoding/events{/privacy}","received_events_url":"https://api.github.com/users/ConstructiveCoding/received_events","type":"Organization","site_admin":false},"repo":{"id":56579565,"name":"react-native-maps","full_name":"ConstructiveCoding/react-native-maps","owner":{"login":"ConstructiveCoding","id":395428,"avatar_url":"https://avatars.githubusercontent.com/u/395428?v=3","gravatar_id":"","url":"https://api.github.com/users/ConstructiveCoding","html_url":"https://github.com/ConstructiveCoding","followers_url":"https://api.github.com/users/ConstructiveCoding/followers","following_url":"https://api.github.com/users/ConstructiveCoding/following{/other_user}","gists_url":"https://api.github.com/users/ConstructiveCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ConstructiveCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConstructiveCoding/subscriptions","organizations_url":"https://api.github.com/users/ConstructiveCoding/orgs","repos_url":"https://api.github.com/users/ConstructiveCoding/repos","events_url":"https://api.github.com/users/ConstructiveCoding/events{/privacy}","received_events_url":"https://api.github.com/users/ConstructiveCoding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ConstructiveCoding/react-native-maps","description":"React Native Mapview component for iOS + Android","fork":true,"url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps","forks_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/forks","keys_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/teams","hooks_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/hooks","issue_events_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/issues/events{/number}","events_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/events","assignees_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/assignees{/user}","branches_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/branches{/branch}","tags_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/tags","blobs_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/git/refs{/sha}","trees_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/statuses/{sha}","languages_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/languages","stargazers_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/stargazers","contributors_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/contributors","subscribers_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/subscribers","subscription_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/subscription","commits_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/commits{/sha}","git_commits_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/git/commits{/sha}","comments_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/comments{/number}","issue_comment_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/issues/comments{/number}","contents_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/contents/{+path}","compare_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/merges","archive_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/downloads","issues_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/issues{/number}","pulls_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/pulls{/number}","milestones_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/milestones{/number}","notifications_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/labels{/name}","releases_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/releases{/id}","deployments_url":"https://api.github.com/repos/ConstructiveCoding/react-native-maps/deployments","created_at":"2016-04-19T08:35:38Z","updated_at":"2016-07-12T12:00:14Z","pushed_at":"2016-07-12T12:00:13Z","git_url":"git://github.com/ConstructiveCoding/react-native-maps.git","ssh_url":"git@github.com:ConstructiveCoding/react-native-maps.git","clone_url":"https://github.com/ConstructiveCoding/react-native-maps.git","svn_url":"https://github.com/ConstructiveCoding/react-native-maps","homepage":null,"size":568,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lelandrichardson:master","ref":"master","sha":"f053a919f8150af40706d400149a71caff67ea8c","user":{"login":"lelandrichardson","id":1885623,"avatar_url":"https://avatars.githubusercontent.com/u/1885623?v=3","gravatar_id":"","url":"https://api.github.com/users/lelandrichardson","html_url":"https://github.com/lelandrichardson","followers_url":"https://api.github.com/users/lelandrichardson/followers","following_url":"https://api.github.com/users/lelandrichardson/following{/other_user}","gists_url":"https://api.github.com/users/lelandrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/lelandrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lelandrichardson/subscriptions","organizations_url":"https://api.github.com/users/lelandrichardson/orgs","repos_url":"https://api.github.com/users/lelandrichardson/repos","events_url":"https://api.github.com/users/lelandrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/lelandrichardson/received_events","type":"User","site_admin":false},"repo":{"id":48764652,"name":"react-native-maps","full_name":"lelandrichardson/react-native-maps","owner":{"login":"lelandrichardson","id":1885623,"avatar_url":"https://avatars.githubusercontent.com/u/1885623?v=3","gravatar_id":"","url":"https://api.github.com/users/lelandrichardson","html_url":"https://github.com/lelandrichardson","followers_url":"https://api.github.com/users/lelandrichardson/followers","following_url":"https://api.github.com/users/lelandrichardson/following{/other_user}","gists_url":"https://api.github.com/users/lelandrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/lelandrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lelandrichardson/subscriptions","organizations_url":"https://api.github.com/users/lelandrichardson/orgs","repos_url":"https://api.github.com/users/lelandrichardson/repos","events_url":"https://api.github.com/users/lelandrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/lelandrichardson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lelandrichardson/react-native-maps","description":"React Native Mapview component for iOS + Android","fork":false,"url":"https://api.github.com/repos/lelandrichardson/react-native-maps","forks_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/forks","keys_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/teams","hooks_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/hooks","issue_events_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/events{/number}","events_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/events","assignees_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/assignees{/user}","branches_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/branches{/branch}","tags_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/tags","blobs_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/git/refs{/sha}","trees_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/statuses/{sha}","languages_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/languages","stargazers_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/stargazers","contributors_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/contributors","subscribers_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/subscribers","subscription_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/subscription","commits_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/commits{/sha}","git_commits_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/git/commits{/sha}","comments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/comments{/number}","issue_comment_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/comments{/number}","contents_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/contents/{+path}","compare_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/merges","archive_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/downloads","issues_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues{/number}","pulls_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls{/number}","milestones_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/milestones{/number}","notifications_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/labels{/name}","releases_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/releases{/id}","deployments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/deployments","created_at":"2015-12-29T19:54:20Z","updated_at":"2016-07-12T14:49:57Z","pushed_at":"2016-07-12T16:59:31Z","git_url":"git://github.com/lelandrichardson/react-native-maps.git","ssh_url":"git@github.com:lelandrichardson/react-native-maps.git","clone_url":"https://github.com/lelandrichardson/react-native-maps.git","svn_url":"https://github.com/lelandrichardson/react-native-maps","homepage":null,"size":823,"stargazers_count":1101,"watchers_count":1101,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":141,"forks":232,"open_issues":141,"watchers":1101,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386"},"html":{"href":"https://github.com/lelandrichardson/react-native-maps/pull/386"},"issue":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/386"},"comments":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/386/comments"},"review_comments":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386/comments"},"review_comment":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/pulls/386/commits"},"statuses":{"href":"https://api.github.com/repos/lelandrichardson/react-native-maps/statuses/a2d66374f5d86ab809126416d253252aeaff23ea"}}}}
{"actor":{"display_login":"felipecsl"}}