Code:
Ext.Loader.setConfig({
enabled: true
});
Ext.Loader.setPath('Ext.ux', 'js/extjs/ux/');
Ext.require([
'Ext.window.Window',
'Ext.tab.*',
'Ext.toolbar.Spacer',
'Ext.layout.container.Card',
'Ext.layout.container.Border',
'Ext.util.Floating',
'Ext.util.Observable',
'Ext.util.Animate',
'Ext.state.Stateful',
'Ext.form.*',
'Ext.tip.*',
'Ext.panel.*',
'Ext.button.*',
'Ext.container.ButtonGroup',
'Ext.layout.container.Table',
'Ext.data.*',
'Ext.grid.*',
'Ext.ux.statusbar.StatusBar'
]);
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.require([
'Ext.form.*'
]);
var cont = new Ext.Window({
layout: 'fit',
closeAction: 'hide',
border: false,
width:1162,
height:380,
renderTo: Ext.getBody(),
title: 'Карта',
resizable: false,
draggable: false,
closable: false,
border: false,
x:200,
y:70,
items: {
xtype: 'gmappanel',
zoomLevel: 14,
gmapType: 'map',
mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
setCenter: {
geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
marker: {title: 'Fenway Park'}
},
markers: [{
lat: 42.339641,
lng: -71.094224,
marker: {title: 'Boston Museum of Fine Arts'},
listeners: {
click: function(e){
Ext.Msg.alert({title: x, text: 'and its art.'});
}
}
},{
lat: 42.339419,
lng: -71.09077,
marker: {title: 'Northeastern University'}
}]
}
});
cont.show();
var toolbc = new Ext.Window({
width:200,
height:380,
resizable: false,
draggable: false,
closable: false,
title: 'Выберите точки',
border: false,
x:0,
y:70,
items:[
{ xtype: 'textfield', fieldLabel: 'First Name'},
new Ext.form.TextField({fieldLabel: 'Surname'}),
]
});
toolbc.show();
var desc = new Ext.Window({
width:1362,
height:121,
resizable: false,
draggable: false,
closable: false,
border: false,
title: 'Краткое описание',
x:0,
y:450,
items:[
{ xtype: 'textfield', fieldLabel: 'First Name'},
new Ext.form.TextField({fieldLabel: 'Surname'}),
]
});
desc.show();
});
how can i looks for coordinates over mouse and alert them (for example) if clicked