{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/react-native-mapbox-gl/issues/1254","repository_url":"https://api.github.com/repos/mapbox/react-native-mapbox-gl","labels_url":"https://api.github.com/repos/mapbox/react-native-mapbox-gl/issues/1254/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/react-native-mapbox-gl/issues/1254/comments","events_url":"https://api.github.com/repos/mapbox/react-native-mapbox-gl/issues/1254/events","html_url":"https://github.com/mapbox/react-native-mapbox-gl/issues/1254","id":332728436,"node_id":"MDU6SXNzdWUzMzI3Mjg0MzY=","number":1254,"title":"setCamera stopped when updating map, need callback ? ","user":{"login":"Maxence-Machu","id":23130568,"node_id":"MDQ6VXNlcjIzMTMwNTY4","avatar_url":"https://avatars2.githubusercontent.com/u/23130568?v=4","gravatar_id":"","url":"https://api.github.com/users/Maxence-Machu","html_url":"https://github.com/Maxence-Machu","followers_url":"https://api.github.com/users/Maxence-Machu/followers","following_url":"https://api.github.com/users/Maxence-Machu/following{/other_user}","gists_url":"https://api.github.com/users/Maxence-Machu/gists{/gist_id}","starred_url":"https://api.github.com/users/Maxence-Machu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maxence-Machu/subscriptions","organizations_url":"https://api.github.com/users/Maxence-Machu/orgs","repos_url":"https://api.github.com/users/Maxence-Machu/repos","events_url":"https://api.github.com/users/Maxence-Machu/events{/privacy}","received_events_url":"https://api.github.com/users/Maxence-Machu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-15T10:45:07Z","updated_at":"2018-06-15T10:45:07Z","closed_at":null,"author_association":"NONE","body":"Hello everyone, i'm facing an issue with setCamera / flyTo. \r\n\r\nI'm updating the component state after setCamera.\r\n```\r\nthis._map.setCamera({\r\n        centerCoordinate: [selected.data.lng, selected.data.lat],\r\n        zoom: 15,\r\n        heading: 0,\r\n        duration: duration,\r\n      })\r\n```\r\n_then > setState_ \r\n\r\n\r\nJust after updating the state the camera animation is stopped.\r\n\r\n- Is there any callback method for the setCamera ? \r\n- Should I update the state after a timeout ? \r\n- Or async / await ? \r\n\r\nThanks Mapbox Community ;)"}}
{"actor":{"display_login":"Maxence-Machu"}}