<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hey,<br>
<br>
Thanks for the patch. I implemented it this morning.&nbsp; I've had one
problem that I wanted to make you aware of. Perhaps it is only on my
system, as I am working from a checked out SVN from 2 weeks ago. It
works great when panning, but the image doesn't shift properly when
zooming in or out. It waits until the new requested image is returned
before it updates its position. Thus, if you have multiple layers on
from different servers and some respond quicker than others they don't
overlay properly until the new image is returned.<br>
<br>
Could you please let me know if I am the only one that is experiencing
this?<br>
<br>
Thanks,<br>
Dejung<br>
<br>
XinGang Li wrote:
<blockquote
 cite="mid:9b9b15ea0712051809id67cea9j4636ecfa49773d35@mail.gmail.com"
 type="cite">This is a simple patch to avoid the flash problem when
using singleTile layer.<br>
  <br clear="all">
--- E:/OpenLayers-svn/lib/OpenLayers/Tile/Image.js&nbsp;&nbsp;&nbsp; Wed Nov 28
14:13:24 2007<br>
+++ E:/OpenLayers-2.5/lib/OpenLayers/Tile/Image.js&nbsp;&nbsp;&nbsp; Thu Dec 06
09:52:54 2007
  <br>
@@ -120,8 +120,13 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.url = this.layer.getURL(this.bounds);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // position the frame <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.modifyDOMElement(this.frame, <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.layer.singleTile
) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.modifyDOMElement(this.frame, <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; null, null, this.size);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.modifyDOMElement(this.frame, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; null, this.position,
this.size);&nbsp;&nbsp; <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var imageSize = this.layer.getImageSize(); <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.layerAlphaHack) {<br>
@@ -141,7 +146,7 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; be reused in a new location.
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp;&nbsp; clear: function() {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(this.imgDiv) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(this.imgDiv &amp;&amp; !this.layer.singleTile) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.imgDiv.style.display = "none";<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp; },
  <br>
@@ -203,6 +208,9 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // can register when a tile has finished loading.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var onload = function() {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.layer.singleTile) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.modifyDOMElement
(this.frame, null, this.position);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //normally isLoading should always be true here but there
are some <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // right funky conditions where loading and then reloading
a tile<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // with the same url *really*fast*. this check prevents
sending <br>
  <br>
BTW: The edit toolbar also have the flash problem when zoom and pan the
map. I found if we add the controls into the div [not viewPortDiv]&nbsp; of
the map, we can avoid this problem.
  <br>
  <br>
-- <br>
Li XinGang<br>
EMail: <a moz-do-not-send="true" href="mailto:slinavlee@gmail.com">slinavlee@gmail.com</a><br>
Blog:&nbsp;&nbsp; <a moz-do-not-send="true" href="http://avlee.cnblogs.com">avlee.cnblogs.com</a>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dev@openlayers.org">Dev@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</a>
  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font color="#000000"><b>Dejung Gewissler</b></font><br>
New Jersey Office of Information Technology<br>
<font color="#006600">Office of Geographic Information Systems</font><br>
200 Riverview Plaza<br>
PO Box 212, Trenton, NJ 08625-0212<br>
<br>
609.777.3754
</div>
</body>
</html>