Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Use a Map in a Scrollview


i have a question on the scrollview. I put 4 views, one of them is a mapview, into this.

But i can't use the map functions like zoom in this scrollview because im switching to the next view.

So i put 4 Buttons to control these views in my app.

Now i can disable the touch on the scrollview, and switch via the buttons between the views.

Now i got the problem, that i cant use the map at all. is there an other way to use the map with other views together?

— asked June 7th 2010 by Michael Gajda
  • buttons
  • iphone
  • mapview
  • scrolling
  • scrollview
  • view

1 Answer

  • Two things:

    1. Set the dimensions of everything. If you don't, a view may overlay another element without you knowing it, unless it has a background of course. If you're on Android and you want to use percentage width & height use the Ti.Platform.displayCaps.platformWidth and platformHeight multiplied by a float from 0 to 1, so 50% is now 0.5.

    2. Set zIndexes of everything. The items you want on top set to the highest values. This shouldn't be as big of an issue if you have dimensions set on everything, but this ensures that no other element is sitting on top of a smaller element that should be on top.

    — answered April 5th 2011 by Joe iEntry
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.