--- /dev/null
+<html>\r
+<head>\r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js">\r
+Ext.onReady(function(){\r
+\r
+ var mapwin;\r
+ var button = Ext.get('show-btn');\r
+\r
+ button.on('click', function(){\r
+ // create the window on the first click and reuse on subsequent clicks\r
+ if(!mapwin){\r
+\r
+ mapwin = new Ext.Window({\r
+ layout: 'fit',\r
+ title: 'GMap Window',\r
+ closeAction: 'hide',\r
+ width:400,\r
+ height:400,\r
+ x: 40,\r
+ y: 60,\r
+ items: {\r
+ xtype: 'gmappanel',\r
+ region: 'center',\r
+ zoomLevel: 14,\r
+ gmapType: 'map',\r
+ mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],\r
+ mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],\r
+ setCenter: {\r
+ geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',\r
+ marker: {title: 'Fenway Park'}\r
+ },\r
+ markers: [{\r
+ lat: 42.339641,\r
+ lng: -71.094224,\r
+ marker: {title: 'Boston Museum of Fine Arts'},\r
+ listeners: {\r
+ click: function(e){\r
+ Ext.Msg.alert('Its fine', 'and its art.');\r
+ }\r
+ }\r
+ },{\r
+ lat: 42.339419,\r
+ lng: -71.09077,\r
+ marker: {title: 'Northeastern University'}\r
+ }]\r
+ }\r
+ });\r
+ \r
+ }\r
+ \r
+ mapwin.show();\r
+ \r
+ });\r
+ \r
+ });</pre> \r
+</body>\r
+</html>
\ No newline at end of file