{"action":"created","issue":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/180","repository_url":"https://api.github.com/repos/lelandrichardson/react-native-maps","labels_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/180/comments","events_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/180/events","html_url":"https://github.com/lelandrichardson/react-native-maps/issues/180","id":148312162,"number":180,"title":"Error on using fitToElements","user":{"login":"gathole","id":1858208,"avatar_url":"https://avatars.githubusercontent.com/u/1858208?v=3","gravatar_id":"","url":"https://api.github.com/users/gathole","html_url":"https://github.com/gathole","followers_url":"https://api.github.com/users/gathole/followers","following_url":"https://api.github.com/users/gathole/following{/other_user}","gists_url":"https://api.github.com/users/gathole/gists{/gist_id}","starred_url":"https://api.github.com/users/gathole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gathole/subscriptions","organizations_url":"https://api.github.com/users/gathole/orgs","repos_url":"https://api.github.com/users/gathole/repos","events_url":"https://api.github.com/users/gathole/events{/privacy}","received_events_url":"https://api.github.com/users/gathole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-04-14T10:05:05Z","updated_at":"2016-08-20T17:16:44Z","closed_at":null,"body":"To set the Google Map zoom level to show all the markers, I was suggested  to use **fitToElements** but I am getting error **\"not included points\"**\r\n\r\nHere is my code and markers have 2 points:\r\n```javascript\r\n  componentDidMount() {\r\n    this.refs.map.fitToElements(true);\r\n  }\r\n\r\n  render() {\r\n    var markers = this.props.markers || [];\r\n    return (\r\n      <MapView\r\n        ref=\"map\"\r\n        style={[styles.map, this.props.mapStyle]}\r\n        initialRegion={this.getInitialRegion(markers)}>\r\n        {markers.map(marker => (\r\n          <MapView.Marker \r\n            coordinate={marker.latlng}\r\n            title={marker.title}\r\n            description={marker.description}\r\n            image={marker.image}/>\r\n        ))}\r\n      </MapView>\r\n    );\r\n  }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/comments/241212295","html_url":"https://github.com/lelandrichardson/react-native-maps/issues/180#issuecomment-241212295","issue_url":"https://api.github.com/repos/lelandrichardson/react-native-maps/issues/180","id":241212295,"user":{"login":"ddresch","id":986306,"avatar_url":"https://avatars.githubusercontent.com/u/986306?v=3","gravatar_id":"","url":"https://api.github.com/users/ddresch","html_url":"https://github.com/ddresch","followers_url":"https://api.github.com/users/ddresch/followers","following_url":"https://api.github.com/users/ddresch/following{/other_user}","gists_url":"https://api.github.com/users/ddresch/gists{/gist_id}","starred_url":"https://api.github.com/users/ddresch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddresch/subscriptions","organizations_url":"https://api.github.com/users/ddresch/orgs","repos_url":"https://api.github.com/users/ddresch/repos","events_url":"https://api.github.com/users/ddresch/events{/privacy}","received_events_url":"https://api.github.com/users/ddresch/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T17:16:44Z","updated_at":"2016-08-20T17:16:44Z","body":"@symmetriccurve thx for this hint. You are right that's the way to do it!"}}
{"actor":{"display_login":"ddresch"}}