{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2042","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2042/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2042/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2042/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/2042","id":100536837,"number":2042,"title":"getMapAsync for Android like in Google maps","user":{"login":"erf","id":1562523,"avatar_url":"https://avatars.githubusercontent.com/u/1562523?v=3","gravatar_id":"","url":"https://api.github.com/users/erf","html_url":"https://github.com/erf","followers_url":"https://api.github.com/users/erf/followers","following_url":"https://api.github.com/users/erf/following{/other_user}","gists_url":"https://api.github.com/users/erf/gists{/gist_id}","starred_url":"https://api.github.com/users/erf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erf/subscriptions","organizations_url":"https://api.github.com/users/erf/orgs","repos_url":"https://api.github.com/users/erf/repos","events_url":"https://api.github.com/users/erf/events{/privacy}","received_events_url":"https://api.github.com/users/erf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Android","name":"Android","color":"5319e7"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/feature","name":"feature","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-12T12:55:06Z","updated_at":"2015-10-07T23:33:26Z","closed_at":null,"body":"Would it be an idea to load the mapview async as in google maps:\r\n<pre>\r\n   mapFragment = new SupportMapFragment();\r\n        mapFragment.getMapAsync(this);\r\n\r\n   FragmentManager fragmentManager = getSupportFragmentManager();\r\n   FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\r\n   fragmentTransaction.replace(R.id.container, mapFragment);\r\n   fragmentTransaction.commit();\r\n</pre>\r\nIn this way you could make the mapFragment static so you don't have to reinstanciate it each time you create the activity containing the map.\r\n\r\nI have made an implementation of this."},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/146367004","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/2042#issuecomment-146367004","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2042","id":146367004,"user":{"login":"ljbade","id":1215089,"avatar_url":"https://avatars.githubusercontent.com/u/1215089?v=3","gravatar_id":"","url":"https://api.github.com/users/ljbade","html_url":"https://github.com/ljbade","followers_url":"https://api.github.com/users/ljbade/followers","following_url":"https://api.github.com/users/ljbade/following{/other_user}","gists_url":"https://api.github.com/users/ljbade/gists{/gist_id}","starred_url":"https://api.github.com/users/ljbade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljbade/subscriptions","organizations_url":"https://api.github.com/users/ljbade/orgs","repos_url":"https://api.github.com/users/ljbade/repos","events_url":"https://api.github.com/users/ljbade/events{/privacy}","received_events_url":"https://api.github.com/users/ljbade/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T23:33:26Z","updated_at":"2015-10-07T23:33:26Z","body":"@tobrun Interesting! Perhaps we should put this on 2.2.0 milestone as part of the refactor."}}