[MOD-2388] Android ti.map module does not update bearing, tilt or zoom attributes when region changes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Map |
Labels | n/a |
Reporter | Michael Garwood |
Assignee | Unknown |
Created | 2018-01-17T17:57:54.000+0000 |
Updated | 2018-03-06T18:52:19.000+0000 |
Description
When the user alters the map view the bearing, tilt and zoom region properties are not updated and in fact are undefined.
This can be reproduced with the following test case:
var Map = require('ti.map');
var mapview = Map.createView({
mapType: Map.SATELLITE_TYPE,
region: {latitude: latitude, longitude: longitude, zoom: 15},
animate:true,
regionFit:true,
userLocation: false
});
[console.log("Original Bearing," + mapview.region.bearing);
console.log("Original Tilt," + mapview.region.tilt);
console.log("Original Zoom," + mapview.region.zoom);
// manipulate map to alter zoom, bearing and/or tilt on map view
console.log("New Bearing," + mapview.region.bearing);
console.log("New Tilt," + mapview.region.tilt);
console.log("New Zoom," + mapview.region.zoom);
Possible fix is to include the following in the onCameraMoveStarted and onCameraIdle event handlers in src/ti/map/TIUIMapView.java:
d.put(MapModule.PROPERTY_BEARING, position.bearing);
d.put(MapModule.PROPERTY_ZOOM, position.zoom);
d.put(MapModule.PROPERTY_TILT, position.tilt);
No comments