1. #1
    Ext User
    Join Date
    Dec 2008
    Posts
    10
    Vote Rating
    0
    JsFun is on a distinguished road

      0  

    Question Trouble with Ext Gmap

    Trouble with Ext Gmap


    Problem with Ext lib/example/gmap example:

    I always got this error"this.getMap() is undefined", cauz i wanna get the gmap object so that i can add more place markers into gmap just like this:

    Code:
    var gmapPanel=mapwin.getComponent('gmap');
    var map=gmapPanel.getMap().addOverlay(new Gmarker(lat,lng));
    ...
    just can't understand why this.getMap() in Ext.ux.GmapPanel.js is undefined, but it has been defined, anybody can do a favor?

    Code:
    //gmap.js
     var mapwin;
     var button = Ext.get('show-btn');
    button.on('click', function(){
            // create the window on the first click and reuse on subsequent clicks
            if(!mapwin){
    
                mapwin = new Ext.Window({
                    layout: 'fit',
                    title: 'GMap Window',
                    closeAction: 'hide',
                    width:400,
                    height:400,
                    x: 40,
                    y: 60,
                    items: {
                        xtype: 'gmappanel',
                        id:'gmap',
                        region: 'center',
                        zoomLevel: 14,
                        gmapType: 'map',
                        mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
                        mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
                        setCenter: {
                            geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
                            marker: {title: 'Fenway Park'}
                        },
                        markers: [{
                            lat: 42.339641,
                            lng: -71.094224,
                            marker: {title: 'Boston Museum of Fine Arts'},
                            listeners: {
                                click: function(e){
                                    Ext.Msg.alert('Its fine', 'and its art.');
                                }
                            }
                        },{
                            lat: 42.339419,
                            lng: -71.09077,
                            marker: {title: 'Northeastern University'}
                        }]
                    }
                });

  2. #2
    Ext User
    Join Date
    Dec 2008
    Posts
    10
    Vote Rating
    0
    JsFun is on a distinguished road

      0  

    Arrow


    Hope somebody can give a hint how to use Gmap in Ext, , the lib/example/gmap only show the configuration. Seems that the Ext.ux.GMapPanel doesn't support retrieving the gmap object? If it really doesn't work, there's only way to use gmap by using div in normal html.

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