Ver Mensaje Individual
  #12 (permalink)  
Antiguo 29/05/2018, 09:27
Avatar de ceaped
ceaped
 
Fecha de Ingreso: febrero-2004
Mensajes: 2.185
Antigüedad: 20 años, 2 meses
Puntos: 9
Respuesta: Botón .slideToggle(); no deja ver mapa Street View containers

Hola Hola Alexis 88
Mira lo que tengo, pero cuando presiono el botón de cambiar queda en blanco.

Código Javascript:
Ver original
  1. var panorama;
  2.  
  3. function initMap() {
  4.   panorama = new google.maps.StreetViewPanorama(
  5.     document.getElementById('map'), {
  6.       position: {
  7.         lat: 37.869260,
  8.         lng: -122.254811
  9.       },
  10.       pov: {
  11.         heading: 270,
  12.         pitch: 0
  13.       },
  14.       zoom: 1
  15.     });
  16.  
  17. var vistacalle = new google.maps.Map({
  18. position: {
  19.     lat: 37.869260,
  20.     lng: -122.254811},
  21.     map: astorPlace,
  22.     icon: 'http://dominio.com/icono.png',
  23.     title: 'Nombre'
  24. });
  25.    
  26. panorama = map.getStreetView();
  27. panorama.setPosition(astorPlace);
  28. panorama.setPov(
  29. ({
  30. heading: 270,
  31. pitch: 0
  32. }));
  33. }
  34.  
  35. function toggleStreetView() {
  36. var toggle = panorama.getVisible();
  37. if (toggle == false) {
  38. panorama.setVisible(true);
  39. } else {
  40. panorama.setVisible(false);
  41. }
  42. }

Código HTML:
Ver original
  1. <div id="floating-panel">
  2. <input type="button" value="Alternar Vista de Calle" onclick="toggleStreetView();"></input>
  3. </div>

Gracias por tu ayuda
__________________
Diseñador Gráfico publicitario