First, Do NOT mess with constants. They are in ALL CAPS to let you know they are constants and they should not be messed with unless you are purposely overwriting them in a new class and know what you are doing. If you want the layer to only display at certain zoom levels, then use maxResolution (or maxScale, I would NOT mess with maxExtent for Google layers).
Second, You do not need the RadioButton plugin (it has in fact been depricated). If you use "nodeType:'gx_baselayercontainer'", then it creates a tree loader that automatically creates the baseLayer nodes with a checkedGroup attribute. Any layerNode configured with a 'checkedGroup' will render with a radio button instead of a checkbox and interact with the other layerNodes that share the same 'checkedGroup' value. Third, It looks like your code is correct for the ZoomSlider & ZoomSliderTip. I think the issue is that you messed with the MAX_ZOOM_LEVEL & MIN_ZOOM_LEVEL constants. Matt Priour Kestrel Computer Consulting From: Hugo Sent: Thursday, October 28, 2010 3:09 PM To: [email protected] Subject: [Users] LayerNodeUI and ZoomSlider Hello all, At the moment i'm facing two problems in my app. The first is related with baselayers from google in a tree with the RadioButton plugin. The thing is: if i define the baselayer node not to be expanded the layer is correctly displayed, however when i expand the base layer node i get a blank map and only after selecting a new baselayer things get drawn again. If instead i define the baselayer node to be expanded the layers are all shifted to the upper left corn of the mappanel but no blank map is being displayed as in the first option. I've just used the example tree.html to implement the treepanel. Is this a known problem or is there any other way to accomplish this? If i use a normal tree panel without the radiobutton plugin everything works fine... but obsviously i'm willing to get the radio button there. Any suggestions? My second problem, i have alreadey posted some days ago but got no feedback. I have a sacle combobox and a zoomslider control. When the app is loaded the scale shown in the combobox is different then the one on the zoomslider (1:6933504 vs 1:108336). If i drag it to increase zoom, nothing happens at the first time but from there it starts to make the zooms and the scale values are the same between the zoomslider and the scale combobox. However, i'm not able to zoom to the fullextent with the zoomslider anymore. I think this is related with my definitions on the zoom levels of google base layers. Here is my code: var gstreets = new OpenLayers.Layer.Google( "Google Streets", {MIN_ZOOM_LEVEL: 6, MAX_ZOOM_LEVEL: 20, 'type': G_NORMAL_MAP, 'sphericalMercator': true} ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {MIN_ZOOM_LEVEL: 6, MAX_ZOOM_LEVEL: 20, 'type': G_SATELLITE_MAP, 'sphericalMercator': true} ); var mapPanel = new GeoExt.MapPanel({ region: 'center', id: 'mappanel', height: 377, width: 500, map: map, tbar: [toolbar, zoomSelector], border: true, items: [{ xtype: "gx_zoomslider", vertical: true, height: 100, x: 10, y: 20, plugins: new GeoExt.ZoomSliderTip({ template: "<div> Escala: 1:{scale}</div><div> Resolução: {resolution}</div><div> ZOOM: {zoom}</div>" }) }] }); The scale combobox code is the same as the online example. Both these problems are not throwing any errors into the firebug console. Any help is more than appreciated ;) Thanks in advance, Hugo -------------------------------------------------------------------------------- _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
