[TIMOB-15850] iOS7: Map: Runtime error while creating Ti.Map.createView method
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-12-02T18:47:42.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-3.2.0 |
Reporter | Paras Mishra |
Assignee | Ingo Muschenetz |
Created | 2013-11-29T09:44:51.000+0000 |
Updated | 2013-12-02T18:52:20.000+0000 |
Description
iOS7: Map: Runtime error while creating Ti.Map.createView method
Issue also exist on SDK: 3.1.3.GA using xcode v5
Steps to reproduce:
1.Run the app below.
: [ERROR] Script Error {
backtrace = "#0 () at :0";
line = 1;
message = "'undefined' is not an object (evaluating 'Ti.Map.createView')";
name = TypeError;
sourceId = 48064800;
sourceURL = "file:///var/mobile/Applications/9BBC5C5D-3DD9-470C-B9C9-1415003F0B11/test.app/app.js";
} "
var win = Ti.UI.currentWindow,
mapView = Ti.Map.createView({
mapType: Ti.Map.STANDARD_TYPE,
height: 150,
top:0,
regionFit:true,
userLocation:true,
annotations:[]
}),
resizeBtn = Ti.UI.createButton({
title:"resize map",
width:100,
height:44,
right:5,
bottom:5
}),
mapToggle = false;
if (Ti.Platform.osname === "iphone" || Ti.Platform.osname === "ipad") {
mapView.animate = true;
}
mapView.add(resizeBtn);
win.add(mapView);
resizeBtn.addEventListener("click", function(){
mapToggle = !mapToggle;
if(mapToggle){
mapView.animate({height:250, duration:300});
} else {
mapView.animate({height:150, duration:300});
}
});
win.open();
Expected:
You should see a world map.
Actual:
Runtime error occurs as "
Nov 29 15:09:16 Globals-iPhone-5s test[362]
Closing ticket as invalid. Ti.Map has been deprecated for SDK 3.2.0 and needs to require in ti.map module (http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Map). Here is the positive test case I used to get it working after requiring in the ti.map module:
Tested on: Titanium Studio, build: 3.2.0.201311262027 SDK build: 3.2.0.v20131127194046 CLI: 3.2.0-beta Alloy: 1.3.0-beta Xcode: 5.0.2 Device: iphone 5 (7.0.2)
Reopening ticket to update which test environment I used.