Titanium Community Questions & Answer Archive

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

Map in scrollview

(This is kind of an "add-on question" to this one: http://developer.appcelerator.com/question/5551/maskingscrolling-views )

I'm using a smaller map view inside a scroll view. The scroll view should be only scrolled programmatically but not by actual user interaction (possible?). One of the reasons for this is, that you can't move the map otherwise. I've tried to accomplish this by creating the scroll view with

touchEnabled = false;

but naturally all touch events are now passed to the next window in the stack and I can't interact at all with the content of the scroll view anymore.

Any ideas on how I could get this (unfortunate) combination to work?


P.S.: In retrospect to my earlier issue with scroll views: Is it possible to disable the automatic scrolling for text fields/areas when focused? I'm scrolling the view now manually and the field seems to jump now the last 20px or so.

— asked March 24th 2010 by Florian Plank
  • map
  • scroll
  • touchenabled

1 Answer

  • When you create the map view, try setting scrollEnabled:false - that might get you down the road of where you need to go.

    If that doesn't work, what you might need is the Google Static Maps Image API - using this service, you could get an image to place in a scroll view and have the level of control you need over scrolling.

    — answered June 11th 2010 by Kevin Whinnery
    1 Comment
    • Only add the event addEventListener ('regionchnaged') the mapview and run when we disable the scroll of the scrollview and you can move your map worked for me

      — commented October 2nd 2014 by Govany Perez
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.