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

Reply via email to