Ah, I see. I moved the div to my html, and now I am getting a result. Unfortunately, it is the same result as I was getting before. That was a really good idea, though. I would have never thought to try that. Does it look like I'm just going to be out of luck on this one?
On Dec 10, 1:37 am, Marcelo <[email protected]> wrote: > On Dec 9, 10:58 pm, TheDeal56 <[email protected]> wrote: > > > Thanks for the suggestion, Marcelo. I tried out your code, but I'm > > getting an error stating that vContainer is null. I'm sure I'm just > > overlooking something obvious, but I'm just not seeing it right away. > > As Ross indicated, you need to create the "videoContainer" in the > HTML, not in your script. > > Additionally, the snippet I posted might make it work for the first > infowindow only. Cloning the node might be better, if it works at all: > > GEvent.addListener(marker,'click'function(){ > var vContainer = document.getElementById('videoContainer'); > var clone = vContainer.cloneNode(true); > clone.style.display = ''; > marker.openInfoWindow(clone); > > // Note openInfoWindow(), and not openInfoWindowHtml() > > }) > > If cloning doesn't work, then you'll need to stay with .removeChild() > and .addChild(), but if you want to use video in more than one > infoWindow then you'll need to remove the video container manually > before the infoWindow is closed and its contents destroyed. > > -- > Marcelo -http://maps.forum.nu > -- > > > > > On Dec 9, 10:19 am, Marcelo <[email protected]> wrote: > > > > You could try putting it inside a loose hidden div, and > > > then .removeChild() and .appendChild() that hidden div into the > > > infoWindow. Same principle as this AdSense > > > example:http://maps.forum.nu/gm_adsense_infoWindow.html > > > > <body> > > > ... > > > <div id="videoContainer" style="display:none"> > > > <object ... Your object here/> > > > </div> > > > </body> > > > > and then: > > > > GEvent.addListener(marker,'click'function(){ > > > vContainer = document.getElementById('videoContainer'); > > > vContainer.parentNode.removeChild(vContainer); > > > vContainer.style.display = ''; > > > marker.openInfoWindow(vContainer); > > > > // Note openInfoWindow(), and not openInfoWindowHtml() > > > > }) > > > > Very untested, but it might do the trick :-) > > > Alternatively, you can also try having an empty div inside the > > > infoWindow, and then appendChild() the videoContainer to that div in > > > the last step. > > > > -- > > > Marcelo -http://maps.forum.nu > > > -- > > > > On Dec 9, 5:02 pm, TheDeal56 <[email protected]> wrote: > > > > > Ah, I see what you're saying, and I hadn't considered that before. > > > > I'm not really sure, but I don't think the plugin that I'm using is > > > > searching for anything specific in the html tag. It's pretty much > > > > just a live video feed, and it should be able to run on the fly when > > > > the infowindow is opened. Is there any other way to show the video in > > > > IE without using the object tags? I know that's a long shot, but I'm > > > > running out of ideas. Here's a link to the company that makes the > > > > video cameras and the plugins. This is where I got IE html in the > > > > first > > > > place:http://www.axis.com/techsup/cam_servers/tech_notes/live_video.htm > > > > > On Dec 9, 8:15 am, Rossko <[email protected]> wrote: > > > > > > > If you're loading the page in IE, here's the html that's inside of > > > > > > the > > > > > > marker: > > > > > > <OBJECT ID=\"CamImage\" WIDTH=\"352\" HEIGHT=\"240\" > > > > > > CLASSID=\"CLSID: > > > > > > 917623D1-D8E5-11D2-BE8B-00104B06BDE3\" CODEBASE=\"http:// > > > > > > traf2.murfreesborotn.gov/activex/ > > > > > > AxisCamControl.cab#Version=1,0,2,15\"><PARAM NAME=\"URL\" VALUE= > > > > > > \"http://traf2.murfreesborotn.gov/axis-cgi/mjpg/video.cgi? > > > > > > resolution=352x240&duration=60&camera=3\"> </PARAM></OBJECT> > > > > > > Something to consider ; before the infowindow is opened, that is just > > > > > text held in a javascript variable somewhere. It's not part of the > > > > > document until after it is rendered during infowindow opening ; and it > > > > > is destroyed again when the infowindow closes. > > > > > Addons and plugins like for instance Lightbox that scan the document > > > > > for tags with given ids or classes just won't see them. -- 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.
