[TIMOB-2154] Android: Runtime errors when showing co-ordinates on map
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M05 |
Components | Android |
Labels | android, android_refactor, defect, mapview |
Reporter | Thomas Huelbert |
Assignee | Don Thorp |
Created | 2011-04-15T03:12:11.000+0000 |
Updated | 2011-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)
I don't believe that Android supports setLocation yet. Users needing to workaround this issue can do so by changing lines like:
to:Admittedly this won't provide a nice animated transition between the two locations.
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,
This should have stayed in 1.5.0
(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...
G1 (1.6) G2 (2.2) RC2