{"action":"created","issue":{"url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/696","repository_url":"https://api.github.com/repos/SebastianM/angular-google-maps","labels_url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/696/labels{/name}","comments_url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/696/comments","events_url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/696/events","html_url":"https://github.com/SebastianM/angular-google-maps/issues/696","id":181824548,"number":696,"title":"GoogleMapsAPIWrapper getBounds not returning","user":{"login":"betfun","id":19351998,"avatar_url":"https://avatars2.githubusercontent.com/u/19351998?v=4","gravatar_id":"","url":"https://api.github.com/users/betfun","html_url":"https://github.com/betfun","followers_url":"https://api.github.com/users/betfun/followers","following_url":"https://api.github.com/users/betfun/following{/other_user}","gists_url":"https://api.github.com/users/betfun/gists{/gist_id}","starred_url":"https://api.github.com/users/betfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betfun/subscriptions","organizations_url":"https://api.github.com/users/betfun/orgs","repos_url":"https://api.github.com/users/betfun/repos","events_url":"https://api.github.com/users/betfun/events{/privacy}","received_events_url":"https://api.github.com/users/betfun/received_events","type":"User","site_admin":false},"labels":[{"id":306150440,"url":"https://api.github.com/repos/SebastianM/angular-google-maps/labels/type:%20discussion%20/%20question","name":"type: discussion / question","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-10-08T12:52:21Z","updated_at":"2017-10-16T10:30:32Z","closed_at":null,"author_association":"NONE","body":"**Hello,**\nI am trying to get the maps bounds thourgh the GoogleMapsAPIWrapper service. \nI am using the Promise<LatLngBounds> function getBounds().\n\nNothing is returned. \n\nHere's my code.\n\n```\nconstructor(private searchService: SearchService, \n    private wrapper: GoogleMapsAPIWrapper, \n    private _loader: MapsAPILoader, \n    private zone: NgZone) {\n  }\n\n  ngOnInit() {\n   this.wrapper.getBounds().then(x => console.log(x));  \n  }\n```\n\nthe console.log function is not called as the peomise never returns anything. \n\nThanks \n"},"comment":{"url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/comments/336846799","html_url":"https://github.com/SebastianM/angular-google-maps/issues/696#issuecomment-336846799","issue_url":"https://api.github.com/repos/SebastianM/angular-google-maps/issues/696","id":336846799,"user":{"login":"hesama110","id":9447705,"avatar_url":"https://avatars3.githubusercontent.com/u/9447705?v=4","gravatar_id":"","url":"https://api.github.com/users/hesama110","html_url":"https://github.com/hesama110","followers_url":"https://api.github.com/users/hesama110/followers","following_url":"https://api.github.com/users/hesama110/following{/other_user}","gists_url":"https://api.github.com/users/hesama110/gists{/gist_id}","starred_url":"https://api.github.com/users/hesama110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hesama110/subscriptions","organizations_url":"https://api.github.com/users/hesama110/orgs","repos_url":"https://api.github.com/users/hesama110/repos","events_url":"https://api.github.com/users/hesama110/events{/privacy}","received_events_url":"https://api.github.com/users/hesama110/received_events","type":"User","site_admin":false},"created_at":"2017-10-16T10:30:31Z","updated_at":"2017-10-16T10:30:31Z","author_association":"NONE","body":"thanks to @jplew \r\nin this way can get Bounds ;) \r\n` latNorth: number\r\n  @ViewChild(AgmMap) mapElement: any\r\n  ...\r\n\r\n  checkBounds(map) {\r\n\r\n    const ln = this.mapElement._mapsWrapper.getBounds()\r\n      .then( (latLngBounds) => {\r\n        return latLngBounds.getNorthEast().lat()\r\n      })\r\n    ln.then( x => this.latNorth = x )`"}}
{"actor":{"display_login":"hesama110"}}