<!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">
I was thinking of "resize". I found some code in .\Tile.js <br>
that appeared to have this effect.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Jesper Larsen skrev:
<blockquote
 cite="mid:fa493d130807150034w7144a199oa7181e504538c6cb@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi Kenneth and others,

Thank you for taking the time to elaborate on Christophers suggestion,
it was really helpful (I am new to OpenLayers so I haven't really got
an overview of the code). It seems to solve the problem. I will modify
my own version of the OpenLayers code as a first step. When I am more
confortable with the code and use larger parts of it I will try to
submit a patch (otherwise I will probably just break something else).

Regarding turning on "Smooth transition": My impression from the
documentation is that there are only two transition options (for
Layers), namely null and resize. Where is the option you mention
described?

Regards,
Jesper

2008/7/15 Kenneth Skovhede, GEOGRAF A/S <a class="moz-txt-link-rfc2396E" href="mailto:ks@geograf.dk">&lt;ks@geograf.dk&gt;</a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">As I understand Christopher's answer, this is not built into OpenLayers.
So, you must modify the source code yourself to get this behavior.

"Nothing you can do" then translates to, "There is no option you can switch
on".

You can start up by looking into Layer\Image.js and the function "setUrl"
which calls Tile\Image.js "draw", which in turn invokses .\Tile.js "draw".

You can see here that it calls "clear", which is implemented in
Tile\Image.js.
I suppose you can simply comment out line 188 in Tile\Image.js:
    clear: function() {
        if(this.imgDiv) {
            //this.hide();  --&gt; Commented out
            if (OpenLayers.Tile.Image.useBlankTile) {
                this.imgDiv.src = OpenLayers.Util.getImagesLocation() +
"blank.gif";
            }
        }
    },

I have not tested it, so i probably has some sideeffects.
You may also want to turn on Smooth transition, as that prevents the
original
image from hiding before the new one is visible.

And it is fairly annoying to maintain a modified version of OpenLayers, so
if at all possible,
you should consider adding this as a selectable option, and submitting the
change as a patch.

Another option is to replace the function at runtime, but that is bound to
break when
 OpenLayers is updated.

Regards, Kenneth Skovhede, GEOGRAF A/S


Jesper Larsen skrev:

Hi Christopher, realjax and others,

As I understand your answer Christopher there is nothing I can do to
avoid the blinking. Is that a correct understanding? In case that is
not how I should understand your answer I have setup a minimal demo of
the problem on:

<a class="moz-txt-link-freetext" href="http://jlar.webfactional.com/static/">http://jlar.webfactional.com/static/</a>

When you press the switch button (with most of the browsers I have
tested) the OpenLayers map blinks but the ordinary html img attribute
does not. Any help on this issue is still very welcome.

Regards,
Jesper


2008/7/11 Christopher Schmidt <a class="moz-txt-link-rfc2396E" href="mailto:crschmidt@metacarta.com">&lt;crschmidt@metacarta.com&gt;</a>:


On Fri, Jul 11, 2008 at 12:37:05AM -0700, realjax wrote:


Jesper-5 wrote:


Is the solution to this to use Tween to create a smooth transition
between to Layers? I tried it but I haven't been able to understand
how to do it. I hope someone can help me out. What I tried is simply:



OpenLayers.Tween is not likely going to suit your needs.
I think you need to search for an external solution that has one layer fade
out while the other fades in. You could (with a bit of hacking)  prolly get
this working in combination with a lightweight framework like Mootools for
example.


I don't think this will do what he wants. The proble is that OpenLayers
intentionally hides images before they're loaded -- look at delayDisplay
in OpenLayers.Util.createImage.

In general, we have put no effort into changing this behavior.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>


_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
  </pre>
</blockquote>
</body>
</html>