On Jun 25, 8:52 pm, Joe <[email protected]> wrote: > I should explain: > > I feel that I am close to a solution and didn't feel like changing my > slider completely, but I did try adding MOpacityControl to my project > and only one slider appeared, controlling the opacity for my entire > map, nothing for controlling my tile layers as a group.
MOpacityControl shows one slider for each GTileLayer in each GMapType. It doesn't work with GTileLayerOverlay, but since you didn't post a link to your map, I have no clue which one you're using. For GTileLayerOverlay I adjust opacity like this: http://maps.forum.nu/bakersfield/ but it's not a GControl. > Then, I took > a look at how you implemented it on:http://maps.forum.nu/ > gm_custom_controls.html and saw a lot of: map.addMapType(cMap); going > on and thought that must be the only way to make it work. You looked at the wrong file. ;-) The slider is on a separate file, which is linked to under the map: http://maps.forum.nu/MOpacityControl.js -- Marcelo - http://maps.forum.nu -- > On Jun 25, 1:18 pm, Marcelo <[email protected]> wrote: > > > On Jun 25, 7:43 pm, Joe <[email protected]> wrote: > > > > Marcelo, > > > Yes, I have looked at MOpacityControl before, but I don't think it > > > will exactly work for my purposes. Correct me if I'm wrong, but it is > > > creating a CustomMapType for each overlay, > > > It doesn't create any map types or tile layers. Did you actually look > > at the source? > > > -- > > Marcelo -http://maps.forum.nu > > -- > > > and fast switching between > > > > 17+ of these would not be a fun. As I said, I have modified the > > > maptiler.org slider, and in Firefox, it can in real time change the > > > opacity of all 17 overlays as I slide, by grabbing the divs. Now, I > > > just need to replicate this behavior in IE - something I haven't been > > > able to do at this point. > > > > -Joe > > > On Jun 25, 9:45 am, Marcelo <[email protected]> wrote: > > > > > Have you tried > > > > MOpacityControl?http://maps.forum.nu/gm_custom_controls.html > > > > > Also implemented > > > > here:http://maps.forum.nu/gm_main.html?lat=37.649034&lon=-96.855469&z=4&mT... > > > > > -- > > > > Marcelo -http://maps.forum.nu > > > > -- > > > > > On Jun 25, 4:17 pm, Joe <[email protected]> wrote: > > > > > > 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/b... > > > > > 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 -~----------~----~----~----~------~----~------~--~---
