{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1099","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1099/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1099/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1099/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1099","id":54865289,"number":1099,"title":"bounds parameter in `google-map` not working?","user":{"login":"hanfeisun","id":922081,"avatar_url":"https://avatars.githubusercontent.com/u/922081?v=3","gravatar_id":"","url":"https://api.github.com/users/hanfeisun","html_url":"https://github.com/hanfeisun","followers_url":"https://api.github.com/users/hanfeisun/followers","following_url":"https://api.github.com/users/hanfeisun/following{/other_user}","gists_url":"https://api.github.com/users/hanfeisun/gists{/gist_id}","starred_url":"https://api.github.com/users/hanfeisun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanfeisun/subscriptions","organizations_url":"https://api.github.com/users/hanfeisun/orgs","repos_url":"https://api.github.com/users/hanfeisun/repos","events_url":"https://api.github.com/users/hanfeisun/events{/privacy}","received_events_url":"https://api.github.com/users/hanfeisun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-20T10:16:46Z","updated_at":"2015-01-21T03:07:26Z","closed_at":"2015-01-20T13:14:43Z","body":"The DEMO can be viewed in Plnkr:  http://plnkr.co/edit/xBw6SAAIgezpvp9ndMbP?p=preview\r\n\r\nIn the document, I saw the description of `bounds` parameter is:\r\n\r\nFit the map in the specified bounds. The expression must resolve to an object having both northeast and southwest properties. Each of those properties must have a latitude and a longitude properties\r\n\r\n\r\nI set the bounds in scope:\r\n\r\n    $scope.bd = {\r\n      northeast: {\r\n        latitude: 51.219053,\r\n        longitude: 4.404418\r\n      },\r\n      southwest: {\r\n        latitude: -51.219053,\r\n        longitude: -4.404418\r\n      }\r\n    }\r\n\r\nAnd used it in directive like this:\r\n\r\n    <ui-gmap-google-map bounds=\"bd\" center=\"map.center\" zoom=\"map.zoom\" draggable=\"true\" options=\"options\"></ui-gmap-google-map>\r\n\r\nBut it seems that there is no effect.. the map is not fitted in my specified bounds.. Does that mean the bounds parameter is not working?"},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/70777426","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1099#issuecomment-70777426","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1099","id":70777426,"user":{"login":"cthrax","id":102173,"avatar_url":"https://avatars.githubusercontent.com/u/102173?v=3","gravatar_id":"","url":"https://api.github.com/users/cthrax","html_url":"https://github.com/cthrax","followers_url":"https://api.github.com/users/cthrax/followers","following_url":"https://api.github.com/users/cthrax/following{/other_user}","gists_url":"https://api.github.com/users/cthrax/gists{/gist_id}","starred_url":"https://api.github.com/users/cthrax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cthrax/subscriptions","organizations_url":"https://api.github.com/users/cthrax/orgs","repos_url":"https://api.github.com/users/cthrax/repos","events_url":"https://api.github.com/users/cthrax/events{/privacy}","received_events_url":"https://api.github.com/users/cthrax/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T03:07:26Z","updated_at":"2015-01-21T03:07:26Z","body":"You could pass an initial center and zoom as well as an empty bounds, then $watch the bounds and set them to the desired value on first change. (bounds will be set once the map is loaded)."}}