Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / examples / window / gmap.js
index e016662..0059afd 100644 (file)
@@ -1,25 +1,38 @@
-/*!
- * Ext JS Library 3.2.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
+/*
 
-Ext.onReady(function(){
+This file is part of Ext JS 4
 
-    var mapwin;
-    var button = Ext.get('show-btn');
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
 
-    button.on('click', function(){
+*/
+Ext.Loader.setConfig({enabled: true});
+Ext.Loader.setPath('Ext.ux', '../ux');
+Ext.require([
+    'Ext.window.*',
+    'Ext.ux.GMapPanel'
+]);
+
+Ext.onReady(function(){
+    var mapwin;
+    
+    Ext.get('show-btn').on('click', function() {
         // create the window on the first click and reuse on subsequent clicks
         if(!mapwin){
 
-            mapwin = new Ext.Window({
+            mapwin = Ext.create('Ext.Window', {
                 layout: 'fit',
                 title: 'GMap Window',
                 closeAction: 'hide',
-                width:400,
-                height:400,
+                width:450,
+                height:450,
+                border: false,
                 x: 40,
                 y: 60,
                 items: {
@@ -38,7 +51,7 @@ Ext.onReady(function(){
                         marker: {title: 'Boston Museum of Fine Arts'},
                         listeners: {
                             click: function(e){
-                                Ext.Msg.alert('Its fine', 'and its art.');
+                                Ext.Msg.alert({title: 'Its fine', text: 'and its art.'});
                             }
                         }
                     },{
@@ -55,4 +68,4 @@ Ext.onReady(function(){
         
     });
     
- });
\ No newline at end of file
+ });