Thanks Matt,<br><br>I will look into your suggestions and try to implement them. I had no idea that defining ZOOM_LEVELS would mess things up.<br>Thanks for your clarifications on these subjects.<br>Cheers,<br><br>Hugo<br>
<br><div class="gmail_quote">On Fri, Oct 29, 2010 at 2:30 AM, Matt Priour <span dir="ltr"><<a href="mailto:mpriour@kestrelcomputer.com">mpriour@kestrelcomputer.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="padding-right: 10px; padding-left: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Arial" size="2">First,</font></div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2">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).</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Second,</font></div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Third,</font></div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Matt Priour<br>Kestrel Computer
Consulting<br></font><font face="Arial" size="2"></font></div>
<div style="font: 10pt Tahoma;">
<div><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><br></div>
<div style="background: none repeat scroll 0% 0% rgb(245, 245, 245);">
<div><b>From:</b> <a title="mailto:hfpmartins@gmail.com
CTRL + Click to follow link" href="mailto:hfpmartins@gmail.com" target="_blank">Hugo</a> </div>
<div><b>Sent:</b> Thursday, October 28, 2010 3:09 PM</div>
<div><b>To:</b> <a title="mailto:users@geoext.org
CTRL + Click to follow link" href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> </div>
<div><b>Subject:</b> [Users] LayerNodeUI and ZoomSlider</div></div></div><div><div></div><div class="h5">
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br></div>Hello
all,<br><br>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.<br><br>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?<br><br>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:<br><br>var gstreets = new
OpenLayers.Layer.Google(<br>
"Google Streets",<br>
{MIN_ZOOM_LEVEL: 6,
MAX_ZOOM_LEVEL: 20, 'type': G_NORMAL_MAP, 'sphericalMercator':
true}<br> );<br> var gsat = new
OpenLayers.Layer.Google(<br>
"Google Satellite",<br>
{MIN_ZOOM_LEVEL: 6,
MAX_ZOOM_LEVEL: 20, 'type': G_SATELLITE_MAP, 'sphericalMercator':
true}<br> );<br clear="all"><br><br>var mapPanel = new
GeoExt.MapPanel({<br>
region: 'center',<br>
id: 'mappanel',<br>
height:
377,<br>
width: 500,<br>
map: map,<br>
tbar: [toolbar,
zoomSelector],<br>
border: true,<br>
items: [{<br>
xtype:
"gx_zoomslider",<br>
vertical:
true,<br>
height:
100,<br>
x:
10,<br>
y:
20,<br>
plugins: new
GeoExt.ZoomSliderTip({<br>
template: "<div> Escala: 1:{scale}</div><div> Resolução:
{resolution}</div><div> ZOOM:
{zoom}</div>"<br>
})<br>
}]<br>});<br><br>The
scale combobox code is the same as the online example. <br><br>Both these
problems are not throwing any errors into the firebug console.<br>Any help is
more than appreciated ;)<br>Thanks in advance,<br><br>Hugo<br>
</div></div><p>
</p><hr>
<p></p>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Hugo Martins<br>FMV-UTL<br>CIISA-Epidemiologia e Saúde Pública Veterinária<br>Av. da Universidade Técnica<br>1300-477 Lisboa<br>N 38°42'49.54", W 9°11'43.42"<br>