1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    9
    Vote Rating
    0
    msderosa is on a distinguished road

      0  

    Default Unanswered: any work-arounds to get zoom working in the examples/map demo?

    Unanswered: any work-arounds to get zoom working in the examples/map demo?


    I've been working with the examples/map demo in sencha-touch-2 (pr2) and I notice that the zoom control works fine when I test in Chrome. However, when I switch over to the default Android 2.3 browser, I find that the zoom control has no effect.
    I checked out my Android browser against the google maps "hello world" example and the zoom control works fine there so the problem doesn't seem to be, say, a browser compatibility problem. I can see the visual effects of the controls onclick handler and I thought maybe there was an exception being thrown somewhere in the js --- but when I looked for errors with logcat I didnt see anything. I also tried simplifying the examples/map demo, by getting rid of the toolbar and parent panel. That didnt lead to any clues either.
    Does anyone have any experience getting the zoom control working? or any good work-arounds to make it work? Anyone know if the problem shows up on iPhone?

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    GrowDigital is on a distinguished road

      0  

    Default


    I have noticed this too and it is driving me crazy - did you ever come right?

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Location
    Netherlands
    Posts
    120
    Answers
    3
    Vote Rating
    4
    aacoro is on a distinguished road

      0  

    Default


    On the iPhone I zoom with two fingers.. like regular zoom on sites. But I have no 'plus' and 'minus' buttons on the map...

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    9
    Vote Rating
    0
    msderosa is on a distinguished road

      0  

    Default


    I did a little more investigation into this today. The inability to zoom on the Android browser doesn't seem to have anything to do with the html layout of the map control as reproducing that layout without bringing in the Sencha library, doest cause problems with zoom. One really has to import the Secha js libs before the trouble appears. Also interesting, one cant add an additional handler to the default map control to get zoom to work either -- there is something about Sencha / Android that is actually preventing the default google zoom control from firing events.
    In the end I just turned off the google zoom control, built a quick replacement zoom control, and placed my control into the map.controls array. I have handlers for my control that do something like:
    var zoom = map.getZoom();
    map.setZoom(zoom + 1);
    And that seems to work well enough.
    Overall though this is just one issue in a long line of integration issues (and many many pre-release bugs) I've run into with the map control. That and then this published example not working -- sorry, but it give the impression that the work hasn't been done.

  5. #5
    Sencha User
    Join Date
    Sep 2010
    Location
    Netherlands
    Posts
    120
    Answers
    3
    Vote Rating
    4
    aacoro is on a distinguished road

      0  

    Default


    The Zoom on the Samsung Galaxy Nexus (with android 4) works just as on a iPhone :-), So no 'plus' and 'minus' buttons...

Thread Participants: 2

Tags for this Thread