<div>Well I was trying to add an image layer just like city lights. Basically a transparent gif that I could "swap" out when the user got a little closer. So I saw the seturl function and thought cool. That would work. I have ended up implementing another work around.
</div>
<div> </div>
<div>1. Add an image to the map</div><font color="#008000" size="2">
<div><font color="#000000"><font size="2"></font></font> </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: "true"};</font></div>
<p><font color="#000000">graphic = new OpenLayers.Layer.Image(</font></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p><font color="#000000">'US',</font></p>
<p><font color="#000000">hostUrl + "imgs/blank.gif",</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. </font></p><font size="2">
<p>map.events.register(</p></font><font color="#800000" size="2">'moveend'</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 >= 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 + "imgs/blue.gif";</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> </div>
<div>Thanks,</div>
<div>Linda Rawson<br> </div>
<div><span class="gmail_quote">On 9/17/07, <b class="gmail_sendername">Schuyler Erle</b> <<a href="mailto:schuyler@nocat.net">schuyler@nocat.net</a>> 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>> There is a bug in 2.4 for setUrl. I get an error. So when I look at the
<br>> rest of the class it appears all I need to change is the line<br>><br>> this.draw();<br>><br>> to<br>><br>> this.tile.draw();<br>><br>> This locks up the application. Has anybody else ran into this?
<br><br>Hi, Linda. It's quite possible there's a bug there. Could you please<br>describe what you'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>