<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;color:#000000;"><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I´ve been trying for ages to get this to work...but it just doesn´t.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I wanted to make a simple array store from which I can choose my basemaps...</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0);
 font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>var baselayerStore = new Ext.data.ArrayStore({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                </span>fields: ['basemap'],</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                </span>data:[['mapnik'],['gsat'],['gphy'],['gmap'],['ghyb']]</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                                                </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span> &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;});</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                                        </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>var baselayercombo = new Ext.form.ComboBox({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>&nbsp; &nbsp; &nbsp;id:'baselayercombo',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; store: baselayerStore,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; displayField:'basemap',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; typeAhead: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; mode: 'local',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; forceSelection: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; triggerAction: 'all',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; emptyText:'Select a basemap...',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; &nbsp; selectOnFocus:true</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp; });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span> &nbsp;</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial,
 helvetica, sans-serif" size="2">                                        </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>baselayercombo.on('select', function (combo, record, index) {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span> &nbsp; &nbsp; &nbsp; &nbsp;select = Ext.getCmp('baselayercombo').getValue();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                </span>var mapPanel = Ext.getCmp('mapPanel');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                </span>alert(select);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2"><span class="Apple-tab-span" style="white-space:pre">                                                </span>map.setBaseLayer(select);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space: pre; ">                                </span> &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre; ">        </span>}, this);</font></div></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">The problem is, the map.setBaseLayer just won´t take the getValue from the the comboBox.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">The alert even sends the correct value, but nothing happens!?!?!?!?</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Can anyone see what my error is?</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">yours,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Rob</font></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; position: fixed; "></div>


</div></body></html>