[MOD-2370] Ti.map : Add a getZoom method for Android
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2018-02-11T09:16:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Map |
Labels | n/a |
Reporter | Jeroen van Dijk |
Assignee | Unknown |
Created | 2017-10-13T09:03:36.000+0000 |
Updated | 2018-03-14T18:49:53.000+0000 |
Description
On iOS zooming is very well handled using the Camera object. On Android this is done differently.
The zoom method allows to set the zoom level, but when using the setLocation method and not providing a zoom level the level is reset. This is not what you want when a user has set a specific zoom level. Because of this, the zoom level should be exposed to JS to be able to use it like:
$.mapview.setLocation({
zoom: $.mapview.zoom,
bearing: heading,
latitude: latitude,
longitude: longitude,
animate: true
});
Added this functionality in this PR: https://github.com/appcelerator-modules/ti.map/pull/218