Last change
on this file since 619 was
619,
checked in by ramonb, 15 years ago
|
lib/:
- added new AJAX dependancies: ExtJS, pChart, Lightbox2
|
File size:
1.9 KB
|
Line | |
---|
1 | /* |
---|
2 | * Ext JS Library 2.2.1 |
---|
3 | * Copyright(c) 2006-2009, Ext JS, LLC. |
---|
4 | * licensing@extjs.com |
---|
5 | * |
---|
6 | * http://extjs.com/license |
---|
7 | */ |
---|
8 | |
---|
9 | |
---|
10 | Ext.onReady(function(){ |
---|
11 | |
---|
12 | var mapwin; |
---|
13 | var button = Ext.get('show-btn'); |
---|
14 | |
---|
15 | button.on('click', function(){ |
---|
16 | // create the window on the first click and reuse on subsequent clicks |
---|
17 | if(!mapwin){ |
---|
18 | |
---|
19 | mapwin = new Ext.Window({ |
---|
20 | layout: 'fit', |
---|
21 | title: 'GMap Window', |
---|
22 | closeAction: 'hide', |
---|
23 | width:400, |
---|
24 | height:400, |
---|
25 | x: 40, |
---|
26 | y: 60, |
---|
27 | items: { |
---|
28 | xtype: 'gmappanel', |
---|
29 | region: 'center', |
---|
30 | zoomLevel: 14, |
---|
31 | gmapType: 'map', |
---|
32 | mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'], |
---|
33 | mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'], |
---|
34 | setCenter: { |
---|
35 | geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA', |
---|
36 | marker: {title: 'Fenway Park'} |
---|
37 | }, |
---|
38 | markers: [{ |
---|
39 | lat: 42.339641, |
---|
40 | lng: -71.094224, |
---|
41 | marker: {title: 'Boston Museum of Fine Arts'}, |
---|
42 | listeners: { |
---|
43 | click: function(e){ |
---|
44 | Ext.Msg.alert('Its fine', 'and its art.'); |
---|
45 | } |
---|
46 | } |
---|
47 | },{ |
---|
48 | lat: 42.339419, |
---|
49 | lng: -71.09077, |
---|
50 | marker: {title: 'Northeastern University'} |
---|
51 | }] |
---|
52 | } |
---|
53 | }); |
---|
54 | |
---|
55 | } |
---|
56 | |
---|
57 | mapwin.show(); |
---|
58 | |
---|
59 | }); |
---|
60 | |
---|
61 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.