<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi list,<br>
<br>
I have run into some issues while using code based on the ScaleStore
demo at <a
href="http://api.geoext.org/1.0/examples/zoom-chooser.html">http://api.geoext.org/1.0/examples/zoom-chooser.html</a>
and <a href="http://api.geoext.org/1.0/examples/zoom-chooser.js">http://api.geoext.org/1.0/examples/zoom-chooser.js</a><br>
<br>
The sample code searches for a record in the scale store based on
zoom level. However if using several different baselayers with
different numbers of zoom levels, when changing baselayer the scale
shown in the combobox is incorrect. Original code:<br>
<br>
<pre> var scale = scaleStore.queryBy(function(record){
return this.map.getZoom() == record.data.level;
});
</pre>
<br>
Using a search based on resolution does not have this problem: <br>
<br>
<pre> var scale = this.store.queryBy(function(record){
return this.map.getResolution() == record.data.resolution;
});
</pre>
Shall I open a ticket related to the demo code, or is this thought
of as separate from the main codebase?<br>
<br>
Regards,<br>
<br>
Seth<br>
<br>
<div class="moz-text-html" lang="x-western"> <font color="#888888">--<br>
web:</font><a href="http://geographika.co.uk"><font
color="#888888"> </font>http://geographika.co.uk</a><br>
<font color="#888888">twitter: @geographika<br>
</font><br>
</div>
<br>
</body>
</html>