Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Low
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04
-
Component/s: Android
-
Labels:
-
Environment:
Mac OS X 10.7.5
Titanium SDK version: 3.1.0 (02/11/13 17:10 68a0fef)
ti.map 2.0 module
Android 4.2
Nexus 4
Description
1. Missing a constant to set the HYBRID_TYPE. As a workaround, I can set the mapType to 4 and it works. See code below.
Constant is listed and used as an example in these links:
https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/GoogleMap
https://developers.google.com/maps/documentation/android/map?hl=en#change_the_map_type
2. The regionchanged event does not fire when changing zoom level or moving the map around as with the previous Ti.Map module.
var MapModule = require('ti.map');
|
|
var win = Ti.UI.createWindow({backgroundColor: 'white'});
|
|
var mapview = MapModule.createView({
|
mapType: 4,
|
region: {latitude: 37.389569, longitude: -122.050212, latitudeDelta: 0.1, longitudeDelta: 0.1}
|
});
|
|
function report (e) {
|
Ti.API.info('mapview:' + e.type);
|
}
|
|
mapview.addEventListener('regionchanged', report);
|
mapview.addEventListener('postlayout', report);
|
mapview.addEventListener('complete', report);
|
|
win.add(mapview);
|
win.open();
|