Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * Ext JS Library 3.3.1
  3. * Copyright(c) 2006-2010 Sencha Inc.
  4. * licensing@sencha.com
  5. * http://www.sencha.com/license
  6. */
  7. Ext.onReady(function(){
  8. var mapwin;
  9. var button = Ext.get('show-btn');
  10. button.on('click', function(){
  11. // create the window on the first click and reuse on subsequent clicks
  12. if(!mapwin){
  13. mapwin = new Ext.Window({
  14. layout: 'fit',
  15. title: 'GMap Window',
  16. closeAction: 'hide',
  17. width:400,
  18. height:400,
  19. x: 40,
  20. y: 60,
  21. items: {
  22. xtype: 'gmappanel',
  23. zoomLevel: 14,
  24. gmapType: 'map',
  25. mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
  26. mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
  27. setCenter: {
  28. geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
  29. marker: {title: 'Fenway Park'}
  30. },
  31. markers: [{
  32. lat: 42.339641,
  33. lng: -71.094224,
  34. marker: {title: 'Boston Museum of Fine Arts'},
  35. listeners: {
  36. click: function(e){
  37. Ext.Msg.alert('Its fine', 'and its art.');
  38. }
  39. }
  40. },{
  41. lat: 42.339419,
  42. lng: -71.09077,
  43. marker: {title: 'Northeastern University'}
  44. }]
  45. }
  46. });
  47. }
  48. mapwin.show();
  49. });
  50. });