Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2154] Android: Runtime errors when showing co-ordinates on map

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M05
ComponentsAndroid
Labelsandroid, android_refactor, defect, mapview
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:12:11.000+0000
Updated2011-04-17T01:58:15.000+0000

Description

1.5.0.70ce98 g2 running 2.2, G1 running 1.6, sim 2.2.

1.BaseUI>Views>MapView
2.menu>tap sv (or ATL, or change map types)

results: Runtime error (setLocation)

E/KrollCallback(15753): (kroll$4) [108,39902] ECMA Error evaluating source, invocation: [callMethod OptionMenu.MenuItem.OptionMenu.MenuItem:event:click null], message: TypeError: Cannot find function setLocation in object [Ti.Map.View]. (app://examples/map_view.js#138)
E/KrollCallback(15753): org.mozilla.javascript.EcmaError: TypeError: Cannot find function setLocation in object [Ti.Map.View]. (app://examples/map_view.js#138)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3786)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3850)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2343)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2310)
E/KrollCallback(15753): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1524)
E/KrollCallback(15753): at script(app://examples/map_view.js:138)
E/KrollCallback(15753): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollCallback(15753): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollCallback(15753): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollCallback(15753): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollCallback(15753): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
E/KrollCallback(15753): at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:97)
E/KrollCallback(15753): at android.os.Handler.handleCallback(Handler.java:587)
E/KrollCallback(15753): at android.os.Handler.dispatchMessage(Handler.java:92)
E/KrollCallback(15753): at android.os.Looper.loop(Looper.java:123)
E/KrollCallback(15753): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)

Comments

  1. hal 2011-04-15

    I don't believe that Android supports setLocation yet. Users needing to workaround this issue can do so by changing lines like:

       mapview.setLocation(regionSV);
       
    to:
       mapview.region = regionSV;
       

    Admittedly this won't provide a nice animated transition between the two locations.

  2. hal 2011-04-15

    I've just realised that I missed out what regionSV contains, because I was referring to the KS example mentioned in the ticket description.

    Hence,

       var regionSV = {latitude:37.337681,longitude:-122.038193,animate:true,latitudeDelta:0.04, longitudeDelta:0.04};
       
  3. Don Thorp 2011-04-15

    This should have stayed in 1.5.0

  4. Bill Dawson 2011-04-15

    (from [389d613bc68243ca2b9ea93831160c8d8bc2b58f]) [#2154 state:fixed-in-qa] Support setMapType and setLocation. They weren't in our documentation, so add them there too https://github.com/appcelerator/titanium_mobile/commit/389d613bc68243ca2b9ea93831160c8d8bc2b58f"> https://github.com/appcelerator/titanium_mobile/commit/389d613bc682...

  5. Ralf Pfeiffer 2011-04-15

    G1 (1.6) G2 (2.2) RC2

JSON Source