Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: [OPEN-642] map on 1.0.1 not responding to click events on iPhone, Android

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #11
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469

    Default

    Put these after the library but before your application code:

    Code:
    Ext.gesture.Manager.onMouseEventOld = Ext.gesture.Manager.onMouseEvent;
    Ext.gesture.Manager.onMouseEvent = function(e) {
        var target = e.target;
    
        while (target) {
            if (Ext.fly(target) && Ext.fly(target).hasCls('x-map')) {
                return;
            }
    
            target = target.parentNode;
        }
    
        this.onMouseEventOld.apply(this, arguments);
    };
    Still it's just an temporarily ugly workaround. I'll update this thread again when we have a permanent solution.
    Sencha Touch Lead Architect

  2. #12

    Default

    thanks so much for this workaround jacky. I really appreciate you spending time to code this for us. I can confirm it works for the phones I tested it on

  3. #13
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862

    Default

    Since I worked up this test case trying to figure out the bug, I thought I'd post it here. It might come in handy later when testing to see if it's fixed:

    Code:
    <html>
      <head>
        <title>test</title>
        <link rel="stylesheet" href="sencha-touch-1.0/resources/css/sencha-touch-debug.css" type="text/css">
        <script type="text/javascript" src="sencha-touch-1.0/sencha-touch.js"></script>  
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    
        <script type="text/javascript">
          
    Ext.setup({
      onReady: function() {
    
        function mapClicked(event) {
          pnl.setTitle('clicked: ' + event.latLng.lat() + ',' + event.latLng.lng());
        }
    
        var mapPanel = new Ext.Map({
          listeners:{
            maprender:function(mapCmp) {    
              google.maps.event.addListener(mapPanel.map, 'click', mapClicked);
            }
          }
        });
            
        var pnl = new Ext.Toolbar({
          dock:'top',
        });
        
        var mainPanel = new Ext.Panel({
          layout:'fit',
          fullscreen:true,
          items:[mapPanel],
          dockedItems:[pnl]
        });
        
    
      }
    });
    
        </script>
      </head>
    
      <body></body>
    </html>
    Works with 1.0 as shown above, but when that is changed to 1.0a, it no longer functions.

  4. #14
    Sencha Touch Premium User
    Join Date
    Oct 2010
    Location
    Portland, Maine USA
    Posts
    66

    Default

    I'm blocked by this bug as well. This is essential. At the moment, I can't pop up an infowindow on a marker. Jack, your above workaround -- will it be able to identify the marker clicked and let me place an InfoWindow in it?

  5. #15
    Touch Premium Member
    Join Date
    Jan 2011
    Posts
    1

    Default

    Does the 1.0.2 version of Sencha Touch fix this problem?

  6. #16
    Sencha Touch Premium User
    Join Date
    Oct 2010
    Location
    Portland, Maine USA
    Posts
    66

    Default

    1.0.2 doesn't fix the issue. However, Jack's short-term fix above does. Thanks for posting in Jack, and be sure to let this thread know when this is addressed! :-)

  7. #17
    Sencha User
    Join Date
    Aug 2010
    Location
    San Jose, CA
    Posts
    3

    Default Thx Jacky, nice hack! This saved us in Sencha Touch training!

    Thx Jacky, nice hack! This saved us in Sencha Touch training!

    thx,
    mars

  8. #18
    Sencha User
    Join Date
    Mar 2011
    Posts
    32

    Default

    I agree that this issue needs to be fixed. I'm also just starting to use Sencha Touch, but must totally drop it, because I'm doing a map-based app :-(

    Please fix this. Your framework is otherwise pretty damn great! :-)

  9. #19
    Sencha User
    Join Date
    Mar 2011
    Posts
    32

    Default

    My mistake. It seems to work fine, I just tested. Guess you guys referred to an earlier version. It just seemed to be current, because it has not been mentioned as fixed in this post.

  10. #20
    Sencha User
    Join Date
    Nov 2010
    Location
    Italia, Bologna
    Posts
    9

    Default

    The solution of Jacky Nguyen works fine with Markers but seems not working with polygons... is there workaround for this?
    Thnks.

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Android and click events on map
    By xnakxx in forum Sencha Touch 1.x: Discussion
    Replies: 12
    Last Post: 29 Aug 2011, 8:12 AM
  2. Replies: 4
    Last Post: 3 Dec 2010, 5:43 AM
  3. Default Android and iPhone click/tap styles?
    By djkraz in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 21 Sep 2010, 6:47 AM
  4. Click events and href in Android
    By wprater in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 17 Sep 2010, 9:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •