the setBaseLayer function doesn’t work because that value is a string You need to pass a reference to the actual layer
Matt Priour Kestrel Computer Consulting From: Robert Buckley Sent: Tuesday, August 02, 2011 3:51 PM To: users@geoext.org Subject: [Users] basemapcombo Hi, I´ve been trying for ages to get this to work...but it just doesn´t. I wanted to make a simple array store from which I can choose my basemaps... var baselayerStore = new Ext.data.ArrayStore({ fields: ['basemap'], data:[['mapnik'],['gsat'],['gphy'],['gmap'],['ghyb']] }); var baselayercombo = new Ext.form.ComboBox({ id:'baselayercombo', store: baselayerStore, displayField:'basemap', typeAhead: true, mode: 'local', forceSelection: true, triggerAction: 'all', emptyText:'Select a basemap...', selectOnFocus:true }); baselayercombo.on('select', function (combo, record, index) { select = Ext.getCmp('baselayercombo').getValue(); var mapPanel = Ext.getCmp('mapPanel'); alert(select); map.setBaseLayer(select); }, this); The problem is, the map.setBaseLayer just won´t take the getValue from the the comboBox. The alert even sends the correct value, but nothing happens!?!?!?!? Can anyone see what my error is? yours, Rob -------------------------------------------------------------------------------- _______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users