How to Apply a patch:<br>
<a href="http://trac.openlayers.org/wiki/ApplyingPatches">http://trac.openlayers.org/wiki/ApplyingPatches</a><br>
<br>
Made to order :-)<br>
<br><br><div><span class="gmail_quote">On 4/27/07, <b class="gmail_sendername">kaka</b> &lt;<a href="mailto:drspencer@hotmail.com">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>Thanks for your reply and bug report. No, I am not sure of how to apply a<br>patch, is there documentation on this somewhere?<br><br>Magnus<br><br><br><br>Erik Uzureau-3 wrote:<br>&gt;<br>&gt; sending again without the build OL patch -- msg too big for list :-)
<br>&gt; erik<br>&gt;<br>&gt; ---------- Forwarded message ----------<br>&gt; From: Erik Uzureau &lt;<a href="mailto:erik.uzureau@metacarta.com">erik.uzureau@metacarta.com</a>&gt;<br>&gt; Date: Apr 25, 2007 8:15 PM<br>&gt; Subject: Re: [OpenLayers-Users] Turning on/off layers depending on zoom
<br>&gt; level<br>&gt; To: kaka &lt;<a href="mailto:drspencer@hotmail.com">drspencer@hotmail.com</a>&gt;<br>&gt; Cc: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>&gt;<br>&gt; Hello,<br>&gt;<br>&gt; I have found some more time to look at this, and with your helpful
<br>&gt; description I think I am able to see the problem (and maybe solve it).<br>&gt;<br>&gt; The problem is that if the layer is out of range to start with, we never<br>&gt; hide it. That&#39;s not good.<br>&gt;<br>&gt; I am including a patch that seems to fix this problem in your code.
<br>&gt;<br>&gt; Can you tell me if this fixes it for you?<br>&gt;<br>&gt; If you don&#39;t know how to apply patches, I&#39;ve also included a freshly build<br>&gt; OL from trunk with this patch put in.<br>&gt;<br>&gt; Please let me know if this fixes your problem. I would like to open a
<br>&gt; ticket<br>&gt; for this bug. It won&#39;t make it into the 2.4 release but in 2.5 for sure.<br>&gt;<br>&gt; Thanks for your bug report and your patience with explaining it :-)<br>&gt; Erik<br>&gt;<br>&gt; On 4/22/07, kaka &lt;
<a href="mailto:drspencer@hotmail.com">drspencer@hotmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; The problems I have with the maxResolution are:<br>&gt;&gt;<br>&gt;&gt; a) the markers are dislocated. Have a look at the link I posted and try
<br>&gt;&gt; zooming out - the markers end up in the wrong positions.<br>&gt;&gt;<br>&gt;&gt; b) the markers are visible when thy should not appear. I would like them<br>&gt;&gt; to<br>&gt;&gt; appear when I zoom in the map, and not on first load. However, I keep
<br>&gt;&gt; having<br>&gt;&gt; trouble with this. If they are set to show in the 0.03 resolution, the<br>&gt;&gt; example works just fine. If I set them to 0.02, or any other resolution<br>&gt;&gt; that<br>&gt;&gt; should make them not to render on first load, the example does no longer
<br>&gt;&gt; work as expected. The markers are drawn anyway and in the wrong location<br>&gt;&gt; as<br>&gt;&gt; mentioned in a).<br>&gt;&gt;<br>&gt;&gt; Any help appreciated.<br>&gt;&gt;<br>&gt;&gt; Magnus<br>&gt;&gt;<br>
&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Erik Uzureau-3 wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Kaka,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; It is hard for people to help you because we need a more detailed<br>&gt;&gt; &gt; description of the problem.
<br>&gt;&gt; &gt; I personally do not understand what is going wrong here.<br>&gt;&gt; &gt; Erik<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; On 4/17/07, kaka &lt;<a href="mailto:drspencer@hotmail.com">drspencer@hotmail.com</a>&gt; wrote:
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Any help on this issue would be greatly appreciated. Could it be that<br>&gt;&gt; &gt;&gt; this<br>&gt;&gt; &gt;&gt; is<br>&gt;&gt; &gt;&gt; a bug? The example is over at
<br>&gt;&gt; &gt;&gt; <a href="http://www.villageografica.com/test44/Africa-test.html">http://www.villageografica.com/test44/Africa-test.html</a> and my problem<br>&gt;&gt; is<br>&gt;&gt; &gt;&gt; that the maxResolution doesn´t work with the zoom ranges I want and,
<br>&gt;&gt; &gt;&gt; also,<br>&gt;&gt; &gt;&gt; that the markers are not in the correct position.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Magnus<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;
<br>&gt;&gt; &gt;&gt; kaka wrote:<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; This is an example of the problem I have:<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; <a href="http://www.villageografica.com/test44/Africa-test.html">
http://www.villageografica.com/test44/Africa-test.html</a><br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; If I change the maxResolution to 0.2 the map works fine, but its<br>&gt;&gt; &gt;&gt; current<br>&gt;&gt; &gt;&gt; &gt; 
0.3 won´t work. I hope this illustrates my problem.<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; Erik Uzureau-3 wrote:
<br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt; Dear Kaka,<br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt; Do you have a live example that you could post a link to?<br>&gt;&gt; &gt;&gt; &gt;&gt; Offhand, I can&#39;t see what the problem is... but I might be
<br>&gt;&gt; &gt;&gt; &gt;&gt; able to help you out if I could see it in action<br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt; Erik,<br>&gt;&gt; &gt;&gt; &gt;&gt; Best<br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt; On 4/10/07, kaka &lt;
<a href="mailto:drspencer@hotmail.com">drspencer@hotmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; Thank you very much, Erik, this has been a great help. However, I<br>&gt;&gt; &gt;&gt; have
<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; run<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; into a problem. If the markers are set to not show on first load,<br>&gt;&gt; but<br>&gt;&gt; &gt;&gt; to<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; appear when zooming in, the show/hide functionality stops working
<br>&gt;&gt; and<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; the<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; markers are dislocated when zooming out. My code looks like this:<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; var MarkersLayer2 = new 
OpenLayers.Layer.Text( &quot;Region info&quot;,<br>&gt;&gt; &gt;&gt; {location:<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &quot;markers.txt&quot;, maxResolution: 0.03});<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; Changing the &quot;
0.3&quot; to &quot;0.2&quot; causes the problems mentioned above.<br>&gt;&gt; Is<br>&gt;&gt;<br>&gt;&gt; &gt;&gt; this<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; related to my code or a possible bug?<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;
<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; Magnus<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; kaka wrote:
<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Hi<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; I am trying to turn on/off a layer of markers depending on zoom<br>&gt;&gt; &gt;&gt; level,<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; using google maps as a background layer. Does anyone have
<br>&gt;&gt; &gt;&gt; suggestions<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; on<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; how to achieve this or is there or maybe an example? Thank you<br>&gt;&gt; for<br>&gt;&gt; &gt;&gt; any<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; ideas.
<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Regards,<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Magnus<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;
<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; --<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; View this message in context:<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; <a href="http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9927966">
http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9927966</a><br>&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">
Nabble.com</a>.<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; Users mailing list<br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="mailto:Users@openlayers.org">
Users@openlayers.org</a><br>&gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt; _______________________________________________
<br>&gt;&gt; &gt;&gt; &gt;&gt; Users mailing list<br>&gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt;&gt; &gt;&gt; &gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; --<br>&gt;&gt; &gt;&gt; View this message in context:
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; <a href="http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10048769">http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10048769
</a><br>&gt;&gt;<br>&gt;&gt; &gt;&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&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">Users@openlayers.org</a><br>&gt;&gt; &gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users
</a><br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt; Users mailing list<br>&gt;&gt; &gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<br>&gt;&gt; &gt; <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><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#a10129213">http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10129213</a><br>&gt;&gt;
<br>&gt;&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Users mailing list<br>&gt;&gt; 
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/users">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#a10217404">http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a10217404
</a><br>Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">
Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br></blockquote></div><br>