[Users] basemapcombo
Robert Buckley
robertdbuckley at yahoo.com
Tue Aug 2 22:51:32 CEST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110802/1ba64b6d/attachment.htm
More information about the Users
mailing list