1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    22
    Answers
    1
    Vote Rating
    0
    Kapoc is on a distinguished road

      0  

    Default Answered: Map inside of NavigationView isn't centered correctly

    Answered: Map inside of NavigationView isn't centered correctly


    Hello,

    i am trying to put a Ext.Map as item into a NavigationView. My Problem is that neither the zoom-option nor the map.center are set correctly

    Code:
    Ext.define('myapp.view.Map', {
        extend: 'Ext.navigation.View',
        xtype: 'mappanel',
        
        config: {
            title: 'A Map',
            iconCls: 'map',
            
            items: {
                title: 'The Map',
                xtype: 'map',
                id: 'gmap',
                
                config: {
                    mapOptions: {
                        center: new google.maps.LatLng(52.3934598, 13.1298635),
                        zoom: 18,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                    },
    
    
                },
            }
        },
        
    });

  2. You don't need to use the config object in the map. Try this (haven't tested)

    Code:
    Ext.define('myapp.view.Map', {
        extend: 'Ext.navigation.View',
        xtype: 'mappanel',
    
        config: {
            title: 'A Map',
            iconCls: 'map',
    
            items: {
                title: 'The Map',
                xtype: 'map',
                mapOptions: {
                    center: new google.maps.LatLng(52.3934598, 13.1298635),
                    zoom: 18,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                }
            }
        }
    });

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,724
    Answers
    3359
    Vote Rating
    752
    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


    You don't need to use the config object in the map. Try this (haven't tested)

    Code:
    Ext.define('myapp.view.Map', {
        extend: 'Ext.navigation.View',
        xtype: 'mappanel',
    
        config: {
            title: 'A Map',
            iconCls: 'map',
    
            items: {
                title: 'The Map',
                xtype: 'map',
                mapOptions: {
                    center: new google.maps.LatLng(52.3934598, 13.1298635),
                    zoom: 18,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                }
            }
        }
    });
    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.

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    22
    Answers
    1
    Vote Rating
    0
    Kapoc is on a distinguished road

      0  

    Default


    Thank you, that really solved the Problem.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar