{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/449","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/449/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/449/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/449","id":34562407,"number":449,"title":"Set map bounds to circle bounds?","user":{"login":"ollietreend","id":7735945,"avatar_url":"https://avatars.githubusercontent.com/u/7735945?v=3","gravatar_id":"","url":"https://api.github.com/users/ollietreend","html_url":"https://github.com/ollietreend","followers_url":"https://api.github.com/users/ollietreend/followers","following_url":"https://api.github.com/users/ollietreend/following{/other_user}","gists_url":"https://api.github.com/users/ollietreend/gists{/gist_id}","starred_url":"https://api.github.com/users/ollietreend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollietreend/subscriptions","organizations_url":"https://api.github.com/users/ollietreend/orgs","repos_url":"https://api.github.com/users/ollietreend/repos","events_url":"https://api.github.com/users/ollietreend/events{/privacy}","received_events_url":"https://api.github.com/users/ollietreend/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/labels/needs%20investigation","name":"needs investigation","color":"fbca04"},{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/labels/question","name":"question","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-05-29T15:06:03Z","updated_at":"2015-09-01T19:16:35Z","closed_at":null,"body":"Hi,\r\n\r\n**Intro**\r\nI am currently building a search tool which will plot search results on a map, similar to your typical store locator. The user chooses a location (lat/lon) to search from and a radius. A database is queried for records which are within the specified radius of the user's location. These results are returned back to the browser to be plotted on a Google Map with angular-google-maps.\r\n\r\nI am using `<markers>` directive to display the results on the map. I am also using a `<circle>` directive to show the search radius, setting the `\"center\"` property to be the user's chosen location, and the `\"radius\"` property to be the search radius.\r\n\r\n**The Problem**\r\nI would like to have the map fit to the bounds of the circle. I understand that I can set the `\"bounds\"` property on the `<google-map>` directive. However I'm not sure how I can retrieve the bounds of the circle.\r\n\r\n**Potential Solution**\r\nThe [google.maps.Circle class](https://developers.google.com/maps/documentation/javascript/reference#Circle) has the method `getBounds()` which returns a [LatLngBounds object](https://developers.google.com/maps/documentation/javascript/reference#LatLngBounds). However I'm not sure if I'm able to access the `Circle` object of the `<circle>` directive in order to retrieve its bounds.\r\n\r\nEven if I am able to retrieve the bounds of the `<circle>`, I'm not sure how I would store that in a scope model in order to assign it to the `<google-map>`.\r\n\r\nDo you know how I could achieve the above using angular-google-maps?\r\n\r\n**Also Tried**\r\nI have also tried setting `\"fit\"` to `true` on the `<markers>` directive. This works as expected, however because it fits the map based on the returned results, it doesn't center the map based on the initial search location, nor does it fit to the radius circle.\r\n\r\nI want to show the search location in the center, even if the results only exist within the southern region of the radius circle. Therefore this approach doesn't achieve what I'm looking for.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/136831877","html_url":"https://github.com/angular-ui/angular-google-maps/issues/449#issuecomment-136831877","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/449","id":136831877,"user":{"login":"Jerome2606","id":4534893,"avatar_url":"https://avatars.githubusercontent.com/u/4534893?v=3","gravatar_id":"","url":"https://api.github.com/users/Jerome2606","html_url":"https://github.com/Jerome2606","followers_url":"https://api.github.com/users/Jerome2606/followers","following_url":"https://api.github.com/users/Jerome2606/following{/other_user}","gists_url":"https://api.github.com/users/Jerome2606/gists{/gist_id}","starred_url":"https://api.github.com/users/Jerome2606/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jerome2606/subscriptions","organizations_url":"https://api.github.com/users/Jerome2606/orgs","repos_url":"https://api.github.com/users/Jerome2606/repos","events_url":"https://api.github.com/users/Jerome2606/events{/privacy}","received_events_url":"https://api.github.com/users/Jerome2606/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T19:16:35Z","updated_at":"2015-09-01T19:16:35Z","body":"So, is there any enhancements for this feature?"}}