This duplicates another forum thread, you can visit that thread here.
  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    22
    Vote Rating
    0
    PabloPerezAdsuar is on a distinguished road

      0  

    Default Not center a fixed position in map

    Not center a fixed position in map


    Good afternoon, I am developing a application with sencha touch 2.1.1 and I have problem with component map.

    The problem is that I want center the map in a fixed position in the maprender event using the next code but not working:

    Controller:
    Code:
    Ext.define('ClaveiSAT.controller.MapaPrincipal', {
        extend: 'Ext.app.Controller',
    
    
        config: {
            control: {
                "#mapaPrincipalMapa": {
                    maprender: 'onMapaPrincipalMapaMapRender'
                }
            }
        },
    
    
        onMapaPrincipalMapaMapRender: function(component, eOpts) {
            console.log('Render Map');
    
    
            var posicion = new google.maps.LatLng('39.235478', '-1.799827');
    
    
            Ext.getCmp('mapaPrincipalMapa').setConfig({
                mapOptions:{
                    zoom: 14,
                    mapTypeId: google.maps.MapTypeId.SATELLITE,
                    center : posicion
                }
            });
    
    
        }
    });
    View:
    Code:
    Ext.define('ClaveiSAT.view.MapaPrincipal', {
        extend: 'Ext.Panel',
    
    
        config: {
            height: '100%',
            id: 'mapaPrincipal',
            width: '100%',
            items: [
                {
                    xtype: 'map',
                    height: '100%',
                    id: 'mapaPrincipalMapa',
                    useCurrentLocation : {
                        autoUpdate : false
                    },
                    width: '100%'
                }
            ]
        }
    
    
    });

    Thank you!!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,107
    Vote Rating
    453
    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 mitchellsimoens has much to be proud of

      0  

    Default


    This is a known issue.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    22
    Vote Rating
    0
    PabloPerezAdsuar is on a distinguished road

      0  

    Default


    And.. Have the issue solution??? Where I can find documentation??


    Thanks mitchellsimoens