See:<br>
<a href="http://trac.openlayers.org/ticket/683">http://trac.openlayers.org/ticket/683</a><br><br><div><span class="gmail_quote">On 4/25/07, <b class="gmail_sendername">Erik Uzureau</b> &lt;<a href="mailto:erik.uzureau@metacarta.com">
erik.uzureau@metacarta.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">sending again without the build OL patch -- msg too big for list :-)
<span class="q"><br>
erik<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Erik Uzureau</b> &lt;<a href="mailto:erik.uzureau@metacarta.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
erik.uzureau@metacarta.com</a>&gt;<br>Date: Apr 25, 2007 8:15 PM
<br>Subject: Re: [OpenLayers-Users] Turning on/off layers depending on zoom level<br>To: kaka &lt;<a href="mailto:drspencer@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">drspencer@hotmail.com
</a>&gt;<br>Cc: <a href="mailto:users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users@openlayers.org
</a><br><br></span></span><div><span class="e" id="q_1122b76a0c0888d6_2">Hello, <br>
<br>
I have found some more time to look at this, and with your helpful
description I think I am able to see the problem (and maybe solve it). <br>
<br>
The problem is that if the layer is out of range to start with, we never hide it. That&#39;s not good. <br>
<br>
I am including a patch that seems to fix this problem in your code. <br>
<br>
Can you tell me if this fixes it for you?<br>
<br>
If you don&#39;t know how to apply patches, I&#39;ve also included a freshly build OL from trunk with this patch put in. <br>
<br>
Please let me know if this fixes your problem. I would like to open a
ticket for this bug. It won&#39;t make it into the 2.4 release but in 2.5
for sure. <br>
<br>
Thanks for your bug report and your patience with explaining it :-)<br><span>
Erik</span><div><span><br><br><div><span class="gmail_quote">On 4/22/07, <b class="gmail_sendername">kaka</b> &lt;<a href="mailto:drspencer@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

drspencer@hotmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>The problems I have with the maxResolution are:<br><br>a) the markers are dislocated. Have a look at the link I posted and try<br>zooming out - the markers end up in the wrong positions.<br><br>b) the markers are visible when thy should not appear. I would like them to
<br>appear when I zoom in the map, and not on first load. However, I keep having<br>trouble with this. If they are set to show in the 0.03 resolution, the<br>example works just fine. If I set them to 0.02, or any other resolution that
<br>should make them not to render on first load, the example does no longer<br>work as expected. The markers are drawn anyway and in the wrong location as<br>mentioned in a).<br><br>Any help appreciated.<br><br>Magnus<br>


<br><br><br>Erik Uzureau-3 wrote:<br>&gt;<br>&gt; Kaka,<br>&gt;<br>&gt; It is hard for people to help you because we need a more detailed<br>&gt; description of the problem.<br>&gt; I personally do not understand what is going wrong here.
<br>&gt; Erik<br>&gt;<br>&gt; On 4/17/07, kaka &lt;<a href="mailto:drspencer@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">drspencer@hotmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;
<br>&gt;&gt; Any help on this issue would be greatly appreciated. Could it be that
<br>&gt;&gt; this<br>&gt;&gt; is<br>&gt;&gt; a bug? The example is over at<br>&gt;&gt; <a href="http://www.villageografica.com/test44/Africa-test.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.villageografica.com/test44/Africa-test.html</a> and my problem is
<br>&gt;&gt; that the maxResolution doesn´t work with the zoom ranges I want and,<br>&gt;&gt; also,<br>&gt;&gt; that the markers are not in the correct position.<br>&gt;&gt;<br>&gt;&gt; Magnus<br>&gt;&gt;<br>&gt;&gt;<br>

&gt;&gt;
<br>&gt;&gt;<br>&gt;&gt; kaka wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; This is an example of the problem I have:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; <a href="http://www.villageografica.com/test44/Africa-test.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.villageografica.com/test44/Africa-test.html
</a><br>&gt;&gt; &gt;<br>&gt;&gt; &gt; If I change the maxResolution to 0.2 the map works fine, but its<br>&gt;&gt; current<br>&gt;&gt; &gt; 0.3 won´t work. I hope this illustrates my problem.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Magnus
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Erik Uzureau-3 wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Dear Kaka,<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Do you have a live example that you could post a link to?
<br>&gt;&gt; &gt;&gt; Offhand, I can&#39;t see what the problem is... but I might be<br>&gt;&gt; &gt;&gt; able to help you out if I could see it in action<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Erik,<br>&gt;&gt; &gt;&gt; Best
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On 4/10/07, kaka &lt;<a href="mailto:drspencer@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">drspencer@hotmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt;&gt;
<br>&gt;&gt; &gt;&gt;&gt; Thank you very much, Erik, this has been a great help. However, I
<br>&gt;&gt; have<br>&gt;&gt; &gt;&gt;&gt; run<br>&gt;&gt; &gt;&gt;&gt; into a problem. If the markers are set to not show on first load, but<br>&gt;&gt; to<br>&gt;&gt; &gt;&gt;&gt; appear when zooming in, the show/hide functionality stops working and
<br>&gt;&gt; &gt;&gt;&gt; the<br>&gt;&gt; &gt;&gt;&gt; markers are dislocated when zooming out. My code looks like this:<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; var MarkersLayer2 = new OpenLayers.Layer.Text( &quot;Region info&quot;,
<br>&gt;&gt; {location:<br>&gt;&gt; &gt;&gt;&gt; &quot;markers.txt&quot;, maxResolution: 0.03});<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; Changing the &quot;0.3&quot; to &quot;0.2&quot; causes the problems mentioned above. Is
<br>&gt;&gt; this<br>&gt;&gt; &gt;&gt;&gt; related to my code or a possible bug?<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; Magnus<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt;
<br>&gt;&gt; &gt;&gt;&gt; kaka wrote:<br>&gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;&gt; &gt; Hi<br>&gt;&gt; &gt;&gt;&gt; &gt; I am trying to turn on/off a layer of markers depending on zoom<br>&gt;&gt; level,<br>&gt;&gt; &gt;&gt;&gt; &gt; using google maps as a background layer. Does anyone have
<br>&gt;&gt; suggestions<br>&gt;&gt; &gt;&gt;&gt; on<br>&gt;&gt; &gt;&gt;&gt; &gt; how to achieve this or is there or maybe an example? Thank you for<br>&gt;&gt; any<br>&gt;&gt; &gt;&gt;&gt; &gt; ideas.<br>&gt;&gt; &gt;&gt;&gt; &gt;
<br>&gt;&gt; &gt;&gt;&gt; &gt; Regards,<br>&gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;&gt; &gt; Magnus<br>&gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; --<br>&gt;&gt; &gt;&gt;&gt; View this message in context:
<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; <a href="http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9927966" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9927966
</a><br>&gt;&gt; &gt;&gt;&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nabble.com</a>.<br>&gt;&gt; &gt;&gt;&gt;
<br>&gt;&gt; &gt;&gt;&gt; _______________________________________________
<br>&gt;&gt; &gt;&gt;&gt; Users mailing list<br>&gt;&gt; &gt;&gt;&gt; <a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Users@openlayers.org</a><br>&gt;&gt; &gt;&gt;&gt; 
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://openlayers.org/mailman/listinfo/users
</a><br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; _______________________________________________<br>&gt;&gt; &gt;&gt; Users mailing list<br>&gt;&gt; &gt;&gt; <a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

Users@openlayers.org</a>
<br>&gt;&gt; &gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://openlayers.org/mailman/listinfo/users</a><br>&gt;&gt; &gt;&gt;<br>

&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt;<br>&gt;&gt; --
<br>&gt;&gt; View this message in context:<br>&gt;&gt; <a href="http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10048769" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10048769
</a><br>&gt;&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nabble.com</a>.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Users@openlayers.org</a><br>&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://openlayers.org/mailman/listinfo/users</a><br>&gt;&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Users@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://openlayers.org/mailman/listinfo/users</a><br>&gt;<br>
&gt;<br><br>--<br>View this message in context: <a href="http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10129213" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10129213
</a><br>Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nabble.com</a>.<br><br>_______________________________________________
<br>Users mailing list<br><a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://openlayers.org/mailman/listinfo/users</a><br></blockquote></div>

<br>
</span></div><br clear="all">
</span></div><br clear="all"></blockquote></div><br>