{"action":"created","issue":{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/578","labels_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/578/labels{/name}","comments_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/578/comments","events_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/578/events","html_url":"https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/578","id":98094041,"number":578,"title":"Use current camera values on Map.animateCamera() if properties are not defined","user":{"login":"erasmo-marin","id":8242873,"avatar_url":"https://avatars.githubusercontent.com/u/8242873?v=3","gravatar_id":"","url":"https://api.github.com/users/erasmo-marin","html_url":"https://github.com/erasmo-marin","followers_url":"https://api.github.com/users/erasmo-marin/followers","following_url":"https://api.github.com/users/erasmo-marin/following{/other_user}","gists_url":"https://api.github.com/users/erasmo-marin/gists{/gist_id}","starred_url":"https://api.github.com/users/erasmo-marin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erasmo-marin/subscriptions","organizations_url":"https://api.github.com/users/erasmo-marin/orgs","repos_url":"https://api.github.com/users/erasmo-marin/repos","events_url":"https://api.github.com/users/erasmo-marin/events{/privacy}","received_events_url":"https://api.github.com/users/erasmo-marin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/labels/pending","name":"pending","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/milestones/20","html_url":"https://github.com/wf9a5m75/phonegap-googlemaps-plugin/milestones/1.3.3","labels_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/milestones/20/labels","id":1338506,"number":20,"title":"1.3.3","description":null,"creator":{"login":"Hirbod","id":504909,"avatar_url":"https://avatars.githubusercontent.com/u/504909?v=3","gravatar_id":"","url":"https://api.github.com/users/Hirbod","html_url":"https://github.com/Hirbod","followers_url":"https://api.github.com/users/Hirbod/followers","following_url":"https://api.github.com/users/Hirbod/following{/other_user}","gists_url":"https://api.github.com/users/Hirbod/gists{/gist_id}","starred_url":"https://api.github.com/users/Hirbod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hirbod/subscriptions","organizations_url":"https://api.github.com/users/Hirbod/orgs","repos_url":"https://api.github.com/users/Hirbod/repos","events_url":"https://api.github.com/users/Hirbod/events{/privacy}","received_events_url":"https://api.github.com/users/Hirbod/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-10-05T15:39:38Z","updated_at":"2015-10-05T15:42:51Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-07-30T06:10:39Z","updated_at":"2015-10-05T19:39:00Z","closed_at":null,"body":"When you use `Map.animateCamera()` with something like this, where some values like tilt and zoom are not defined, the camera uses default values instead current camera values. I think this behavior is not the expected behavior.\r\n```javascript\r\nvar GOOGLE = new plugin.google.maps.LatLng(37.422858, -122.085065);\r\nmap.animateCamera({\r\n  'target': GOOGLE,\r\n  'bearing': 140,\r\n  'duration': 5000 // = 5 sec.\r\n}, function() {\r\n  console.log(\"The animation is done\");\r\n});\r\n```\r\nThe only way to workaround this getting camera position with `getCameraPosition()`, because there are no  `getZoom()` or  `getTilt()` functions available. I think the API can be improved a lot.\r\n\r\n```javascript\r\nmap.getCameraPosition(function(camera) {\r\n   map.animateCamera({\r\n     'target':  GOOGLE,\r\n     'duration': 5000,\r\n     'zoom': camera.zoom,\r\n     'bearing': 140,\r\n      'tilt':camera.tilt\r\n    });\r\n});\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25151425-use-current-camera-values-on-map-animatecamera-if-properties-are-not-defined?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/comments/145645638","html_url":"https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/578#issuecomment-145645638","issue_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/578","id":145645638,"user":{"login":"celron","id":7539817,"avatar_url":"https://avatars.githubusercontent.com/u/7539817?v=3","gravatar_id":"","url":"https://api.github.com/users/celron","html_url":"https://github.com/celron","followers_url":"https://api.github.com/users/celron/followers","following_url":"https://api.github.com/users/celron/following{/other_user}","gists_url":"https://api.github.com/users/celron/gists{/gist_id}","starred_url":"https://api.github.com/users/celron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celron/subscriptions","organizations_url":"https://api.github.com/users/celron/orgs","repos_url":"https://api.github.com/users/celron/repos","events_url":"https://api.github.com/users/celron/events{/privacy}","received_events_url":"https://api.github.com/users/celron/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T19:39:00Z","updated_at":"2015-10-05T19:39:00Z","body":"Sorry @Hirbod I didn't realize your comment to me until just now, github can send too many mails.  I will try to do better next time, since I would like to help"}}