]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/classic/window/gmap.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / classic / window / gmap.js
CommitLineData
6527f429
DM
1Ext.require([\r
2 'Ext.window.*',\r
3 'Ext.ux.GMapPanel'\r
4]);\r
5\r
6Ext.onReady(function(){\r
7 var mapwin;\r
8 Ext.get('show-btn').on('click', function() {\r
9 // create the window on the first click and reuse on subsequent clicks\r
10 if(mapwin) {\r
11 mapwin.show();\r
12 } else {\r
13 mapwin = Ext.create('Ext.window.Window', {\r
14 autoShow: true,\r
15 layout: 'fit',\r
16 title: 'GMap Window',\r
17 closeAction: 'hide',\r
18 width:450,\r
19 height:450,\r
20 border: false,\r
21 x: 40,\r
22 y: 60,\r
23 items: {\r
24 xtype: 'gmappanel',\r
25 center: {\r
26 geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',\r
27 marker: {title: 'Fenway Park'}\r
28 },\r
29 markers: [{\r
30 lat: 42.339641,\r
31 lng: -71.094224,\r
32 title: 'Boston Museum of Fine Arts',\r
33 listeners: {\r
34 click: function(e){\r
35 Ext.Msg.alert('It\'s fine', 'and it\'s art.');\r
36 }\r
37 }\r
38 },{\r
39 lat: 42.339419,\r
40 lng: -71.09077,\r
41 title: 'Northeastern University'\r
42 }]\r
43 }\r
44 });\r
45 \r
46 } \r
47 });\r
48 });