{"action":"created","issue":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/44","labels_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/44/comments","events_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/44/events","html_url":"https://github.com/lelandrichardson/react-native-maps/issues/44","id":128689397,"number":44,"title":"Android map view calls onLayout when adding a new child","user":{"login":"jrichardlai","id":159813,"avatar_url":"https://avatars.githubusercontent.com/u/159813?v=3","gravatar_id":"","url":"https://api.github.com/users/jrichardlai","html_url":"https://github.com/jrichardlai","followers_url":"https://api.github.com/users/jrichardlai/followers","following_url":"https://api.github.com/users/jrichardlai/following{/other_user}","gists_url":"https://api.github.com/users/jrichardlai/gists{/gist_id}","starred_url":"https://api.github.com/users/jrichardlai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrichardlai/subscriptions","organizations_url":"https://api.github.com/users/jrichardlai/orgs","repos_url":"https://api.github.com/users/jrichardlai/repos","events_url":"https://api.github.com/users/jrichardlai/events{/privacy}","received_events_url":"https://api.github.com/users/jrichardlai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T01:10:33Z","updated_at":"2016-01-26T01:49:15Z","closed_at":null,"body":"It seems that `MapView._onLayout` is called multiple times when updating the markers. It does not happen for iOS only for Android.\r\n\r\nThis cause an issue that it repositions the map to the `initialRegion` everytime, not sure in Android what triggers the `onLayout` call.\r\n\r\nI have currently a workaround in the component that uses MapView which is that after the first load to not return the `initialRegion` prop anymore.\r\n\r\nThe best would be to fix this in Android but it's also possible to fix this in JS ( set a boolean on componentDidMount and set it / check it in `_onLayout`, unless you think of other issues this could cause ) I could do a PR for that if you want."},"comment":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/comments/174766987","html_url":"https://github.com/lelandrichardson/react-native-maps/issues/44#issuecomment-174766987","issue_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/44","id":174766987,"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},"created_at":"2016-01-26T01:49:15Z","updated_at":"2016-01-26T01:49:15Z","body":"@jrichardlai can you upgrade to the latest version of the lib?  I believe this should be fixed."}}