Video de YouTube en un info window de Google maps

Programación & desarrollo
Avatar de Usuario
Trufa
Macacojunior
Mensajes: 101
Registrado: 08 Jul 2008

Video de YouTube en un info window de Google maps

Mensaje por Trufa »

Macacos,

Cómo andan?? la última visita me la marca el 21.07.2010 19:51:28 así que va sin decir que hace un rato que no me pegaba una vuelta!

Como dice el título este código intenta meter un video adentro de un info window, funciona bien para IE y FF pero no para chrome ni safari.

El video no se mueve junto al mapa etc, alguien se le ocurre por que puede ser?

Código: Seleccionar todo

<!doctype html>
<html>
<head>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
var map;
function initialize() {
    latlng = new google.maps.LatLng(33.4222685, -111.8226402)
    myOptions = {
      zoom: 4,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById("map"),myOptions)
    var point = new google.maps.LatLng(33.4222685, -111.8226402);
    var marker = new google.maps.Marker({
        position: point,
        map: map
    })
    google.maps.event.addListener(marker, "click", function(){
        bubble = new google.maps.InfoWindow({
          content: '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/UmFjNiiVk9w?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/UmFjNiiVk9w?fs=1" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="always" allowfullscreen="true"></embed></object>'
        })
        bubble.open(map, marker);
    })
}
</script>
</head>
<body onload="initialize();">
  <div id="map" style="width: 984px; height: 495px"></div>
</div>
</body>
</html>
Muchas gracias!!

Saludos

Tufa
“I just want to say LOVE YOU SAN!!” and “billy gates why do you make this possible? Stop making money and fix your software!!”
Avatar de Usuario
miltons
Supermacaco
Mensajes: 1622
Registrado: 30 Mar 2009

Mensaje por miltons »

Aparentemente seria para geolocalizar los videos no ?
MacBook Pro (14 pulgadas, 2021) Apple M1 Pro 16GB RAM 500 GB
iPhone 15 PRO MAX, iPad 6th Gen, Airpods

"Computers are like air conditioners, they stop working properly if you open Windows"
Avatar de Usuario
Trufa
Macacojunior
Mensajes: 101
Registrado: 08 Jul 2008

Mensaje por Trufa »

miltons escribió:Aparentemente seria para geolocalizar los videos no ?
Es correcto!
“I just want to say LOVE YOU SAN!!” and “billy gates why do you make this possible? Stop making money and fix your software!!”