I have a map that contains, at the moment, 17 large tile layers likely
with more to come.  I need to have an opacity slider on my map that
changes the opacity for all of the tile layers at once.

I have tried using: http://www.maptiler.org/google-maps-overlay-opacity-control/

I looks nice and works great - for one overlay.  But for 17, it runs
so slow that firefox asks me if I want to continue running the
script.  So, I tried to implement this:

On Aug 19 2008, 1:04 pm, bratliff <[email protected]> wrote:
>     map.addOverlay(whatever);
>     map.getPane(1).lastChild.id="yourdaddy"
>     var div=document.getElementById("yourdaddy");
>
> // For FF & others
>
>     div.style.opacity=whatever;
>
> // For IE
>
>     div.filters.alpha.opacity=Math.round(100*whatever);
>
> For IE, you will have to prime the pump with:
>
>     div.style.filter="alpha(opacity=100)";
>
> Otherwise, "div.filters" will be undefined.
>
> I believe "div.style.MozOpacity" is now obsolete.

from this thread:

http://groups.google.com/group/Google-Maps-API/browse_thread/thread/baeaac543bf95227
which I can't reply to... is it closed? (I'm new here)

Anyway, it works great, and instantly in FF.  I can even have it
adjust all 17 as I slide the slider, but I can't figure out how to do
it for IE and this isn't working:

function setO(i, level) {
 var div=document.getElementById("overlay_id_"+i);
// For FF & others
// div.style.opacity=level;
// For IE
div.style.filter="alpha(opacity=100)";
div.filters.alpha.opacity=Math.round(100.0*level);
}

The first time this function is called in IE, all of my png tiles just
vanish.  I'm not exactly the expert on opacity in IE. Any ideas?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to