This issue duplicates another issue.
  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    36
    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('App.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('App.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
    Gainesville, FL
    Posts
    36,604
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is a known issue.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

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

      0  

    Default


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


    Thanks mitchellsimoens

Thread Participants: 1

Tags for this Thread