Search code examples
javascriptandroidtitaniumappceleratorappcelerator-titanium

How do I move the userLocationButton on Map Module? [Appcelerator]


I'm developing an Android app which uses the Titanium Map module and I would like to move the button that centers the map where the user is located, but I'm not really sure if this can be achieved.

Right now the button is showing on top of my app, and I would like it to be on the bottom, next to the zoom buttons: enter image description here


Solution

  • So, natively it is not exposed how you can change this button's position. However, it is possible to "hack" it as explained in another (native) question: https://stackoverflow.com/a/20750956/249710.

    You could implement this by creating a fork of the Ti.Map module and implement logic that helps you.

    The easiest flow (also mentioned in the native question linked above) is building your own button and positioning that on top of the map.