-
18 Jun 2012 2:43 AM #1
gMapPanel
gMapPanel
i change the address of example of vynil fox and doesn't works
Code:Ext.onReady(function(){ var mapwin; Ext.get('show-btn').on('click', function() { // create the window on the first click and reuse on subsequent clicks if(!mapwin){ mapwin = Ext.create('Ext.Window', { layout: 'fit', title: 'GMap Window', closeAction: 'hide', width:450, height:450, border: false, x: 40, y: 60, items: { xtype: 'gmappanel', id: 'mymap', zoomLevel: 14, gmapType: 'map', mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'], mapControls: ['GSmallMapControl','GMapTypeControl'], setCenter: { geoCodeAddr: "Piazza San Pietro,1 Roma", marker: { title:"Piazza San Pietro,1 Roma" }, }, maplisteners: { click: function(mevt){ Ext.Msg.alert('Lat/Lng of Click', mevt.latLng.lat() + ' / ' + mevt.latLng.lng()); var input = Ext.get('ac').dom, sw = new google.maps.LatLng(39.26940,-76.64323), ne = new google.maps.LatLng(39.38904,-76.54848), bounds = new google.maps.LatLngBounds(sw,ne); var options = { location: mevt.latLng, radius: '1000', types: ['geocode'] }; } } } }); } mapwin.show(); }); });Last edited by scottmartin; 18 Jun 2012 at 5:32 AM. Reason: Please format your code!
Ing theMAdPumpkin
-
18 Jun 2012 5:32 AM #2
Thanks,
Scott.
-
19 Jul 2012 9:35 AM #3
-
19 Jul 2012 10:00 AM #4
hmm .. not sure... sometimes I just like to say thanks!

Scott.
-
12 Mar 2013 8:09 AM #5
getMap () call on gmappanel returns undefined
getMap () call on gmappanel returns undefined
I have migrated from Google Map api v2 to v3. When I try to call getMap() on gmaappanel to pass to markercluster, I am not getting Map object. I have updated GMapPanel3.js and v3 url. If I don't do clustering of marker than it works fine as I am n't extracting Map object from GmapPanel. Code is as below.
Any guess ?Code:Ext.create('Ext.Viewport', { id:'viewport', title: 'Site Register', layout: 'border', items: [ { region: 'west', title: '', id:'searchPanel', split:true, width:600, autoScroll:true, items:[ { xtype :'panel', id :'inboxListPanel', emptyText: 'No records', title : 'Inbox', collapsible: true, draggable: true, style :'text-align:center', items : [grid] } ] },{ region: 'center', id: 'mainPanel', deferredRender: false, items: [ Ext.create("Ext.tab.Panel", { region: 'center', id:'mapPanel', width:'100%', activeTab: 0, items: [{ xtype: 'gmappanel', title: 'Map', id : 'gSiteMap', width:900, height:850, zoomLevel: 5, gmapType: 'map', mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'], mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'], setCenter: { geoCodeAddr: '1600 Penn St, Washington DC, DC', marker:{ title: 'HQ, Washington DC DC'} } }] }] }); var gmp = Ext.getCmp('gSiteMap'); var gm = gmp.getMap(); <----------------- gm is undefined !
-Ankit
-
12 Mar 2013 8:11 AM #6


Reply With Quote
