<div>Well I was trying to add an image layer just like city lights.&nbsp; Basically a transparent gif that I could &quot;swap&quot; out when the user got a little closer.&nbsp; So I saw the seturl function and thought cool.&nbsp; That would work.&nbsp; I have ended up implementing another work around.
</div>
<div>&nbsp;</div>
<div>1.&nbsp; Add an image to the map</div><font color="#008000" size="2">
<div><font color="#000000"><font size="2"></font></font>&nbsp;</div>
<div><font color="#000000"><font size="2">var</font><font size="2"> layerResolutions = [0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101,0.00068664550781
,0.00034332275391,0.00017166137695,0.00008635777450];</font></font></div></font>
<div><font color="#000000">var imageOptions = {resolutions: layerResolutions,transparent: &quot;true&quot;};</font></div>
<p><font color="#000000">graphic = new OpenLayers.Layer.Image(</font></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p><font color="#000000">&#39;US&#39;,</font></p>
<p><font color="#000000">hostUrl + &quot;imgs/blank.gif&quot;,</font></p>
<p><font color="#000000">map.getMaxExtent(),</font></p>
<p><font color="#000000">new OpenLayers.Size(798, 598),</font></p>
<p><font color="#000000">imageOptions);</font></p></blockquote>
<p><font color="#000000"></font></p>
<p><font color="#000000">graphic.displayInLayerSwitcher = false;</font></p>
<p><font color="#000000">graphic.setVisibility(true);</font></p>
<p><font color="#000000">graphic.isBaseLayer = false;</font></p>
<p><font color="#000000">map.addLayer(graphic);</font></p>
<p><font color="#000000">2.&nbsp; </font></p><font size="2">
<p>map.events.register(</p></font><font color="#800000" size="2">&#39;moveend&#39;</font><font size="2">, map, </font><font color="#0000ff" size="2">function</font><font size="2"> (e) {</font><font size="2"><font size="2">

<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>var myScale = (map.getMaxResolution() / map.getResolution());</p></blockquote><font color="#0000ff" size="2">
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>if</p></blockquote></font><font size="2"> (myScale &gt;= 1024) {</font><font size="2"><font size="2">
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p></p></blockquote></blockquote></font><font color="#008000" size="2">var graphicURL = hostUrl + &quot;imgs/blue.gif&quot;;</font>
<div><font color="#008000" size="2">graphic.setUrl(graphicURL);</font></div>
<div dir="ltr">}<font color="#008000" size="2"></font></div></font></font>
<div></div></font>}
<div><br>I am on IIS with IE.</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>Linda Rawson<br>&nbsp;</div>
<div><span class="gmail_quote">On 9/17/07, <b class="gmail_sendername">Schuyler Erle</b> &lt;<a href="mailto:schuyler@nocat.net">schuyler@nocat.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">* On 17-Sep-2007 at 12:27AM PDT, Linda Rawson said:<br>&gt; There is a bug in 2.4 for setUrl.&nbsp;&nbsp;I get an error.&nbsp;&nbsp;So when I look at the
<br>&gt; rest of the class it appears all I need to change is the line<br>&gt;<br>&gt; this.draw();<br>&gt;<br>&gt; to<br>&gt;<br>&gt; this.tile.draw();<br>&gt;<br>&gt; This locks up the application.&nbsp;&nbsp;Has anybody else ran into this?
<br><br>Hi, Linda. It&#39;s quite possible there&#39;s a bug there. Could you please<br>describe what you&#39;re trying to do that causes the error, and what the<br>error is in more detail? Also, what platform and browser are you
<br>experiencing the lock up in? Without more information, it will be<br>difficult to offer assistance.<br><br>SDE<br></blockquote></div><br>