Ext.onReady(function(){
    var mapwin;
    showBtn = Ext.get('show-btn');
     Ext.get('show-btn').on('click', function(){     
        if(!mapwin){

            mapwin = new Ext.Window({
                layout: 'fit',
                title: 'Ocean Beach Club',
                closeAction: 'hide',
                width:400,
                height:400,
                x: 240,
                y: 60,
                items: {
                    xtype: 'gmappanel',
                    region: 'center',
                    zoomLevel: 14,
                    gmapType: 'map',
                    mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
                    mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
                    setCenter: {
                        geoCodeAddr: '3401 Atlantic Avenue, Virginia Beach, VA 23451, USA',
                        marker: {title: 'Ocean Beach Club Resort'}
                    },
                    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'}
                    }]
                }
            });
            
        }
        
        mapwin.show();
        
    });
    
 });
