View Single Post
  #1 (permalink)  
Old October 31st, 2011, 07:33 PM
sedoyksa sedoyksa is offline
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default coordinates google maps etxJS

hi
thereis code
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
or post dragable marker
Reply With Quote