Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4269 in a recent build.
  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    148
    Vote Rating
    9
    pentool will become famous soon enough

      0  

    Default maprender event's 2nd argument is undefined

    maprender event's 2nd argument is undefined


    Just downloaded to test ST 2.2.0-rc.

    Using Ext.Map, the maprender(comp, gmap) event has two arguments, the first being the map component, and the second being the google map.

    Code:
    maprender: function(comp, gmap) {
      console.log(gmap);
    }
    The console log says: undefined. Using it with ST 2.1.1 it prints the google map object.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,710
    Vote Rating
    436
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    380
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default NOT fixed

    NOT fixed


    This one slipped through the cracks of your RC -- Still broken.

    Ext.Map
    Code:
           // @private
    	onTilesLoaded: function() {
    		this.fireEvent('maprender', this, this.map);  //< --- use getter this.getMap() or this._map
    	},
    /**
    * @author Chris Scott
    * @business www.transistorsoft.com
    * @rate $120USD / hr; training $500USD / day / developer (5 dev min)
    *
    * @SenchaDevs http://senchadevs.com/developers/transistor-software
    * @twitter http://twitter.com/#!/christocracy
    * @github https://github.com/christocracy
    */

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    148
    Vote Rating
    9
    pentool will become famous soon enough

      0  

    Default


    I reported it for 2.2.0-RC. The download is still the same, so no new RC provided since. The "Fixed" might be an indication that it will be included in the release following 2.2.0-RC.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    10
    Vote Rating
    1
    Vino999 is on a distinguished road

      1  

    Default


    map doesn't load in final release when
    useCurrentLocation = true is added. Is there some kind of temporary workaround for it?

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Posts
    10
    Vote Rating
    1
    Vino999 is on a distinguished road

      0  

    Default


    My Mistake. I needed to do a reboot of my device (Galaxy S3). Everything working now

  7. #7
    Sencha User
    Join Date
    Dec 2012
    Posts
    65
    Vote Rating
    1
    azamatoak is on a distinguished road

      1  

    Default


    This was still an issue for me on both iOS and Android after upgrading to Sencha Touch 2.2. The Google map component was undefined. Here's the patch that I applied to fix it. I simply assigned the map via the getter to the gMapComponent. This worked for both iOS and Android.

    Code:
    listeners: {
                        maprender: function(extMapComponent, googleMapComp) {
                            googleMapComp = extMapComponent.getMap();
                            var theView = Ext.ComponentQuery.query('retailerMap')[0];
                            var lat = theView.config.data.retailer_latitude;
                            var lng = theView.config.data.retailer_longitude;
                            extMapComponent.setMapCenter({latitude: lat, longitude: lng});
                            var marker = new google.maps.Marker({
                                position: position = new google.maps.LatLng (lat,lng),
                                map: googleMapComp,
                            });
                        }
                    }