Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4832] Android: Titanium.Map.MapView.setLocation broken

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-08-19T13:59:48.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-32, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterAlan Leard
AssigneeAlan Vaghti
Created2011-07-29T10:29:48.000+0000
Updated2011-09-08T12:02:22.000+0000

Description

Titanium.Map.MapView.setLocation returns undefined, whereas Titanium.Map.MapView.location seems to work. setLocation works on iOS. See test below:
var win = Ti.UI.createWindow({
});

var mapview = Titanium.Map.createView({
	mapType: Titanium.Map.STANDARD_TYPE,
    regionFit:true,
    width:'100%',
    height:'100%',
    animate:true,
    userLocation:true
});
 	
//mapview.location = {latitude:40.581691,longitude:-122.3916,latitudeDelta:0.2, longitudeDelta:0.2};
mapview.setLocation({latitude:40.581691,longitude:-122.3916,latitudeDelta:0.2, longitudeDelta:0.2});

win.add(mapview);

alert(mapview.location);

win.open();
API Docs: http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.MapView.setLocation-method.html

Comments

  1. Don Thorp 2011-08-19

    review and merge.
  2. Alan Vaghti 2011-09-08

    Closing. Passed as expected on HTC Hero running 2.1update1, Nexus S running 2.3.4, and LG-V909 (GSlate) tablet running 3.1.

JSON Source