()
| 1 | let marker, map; |
| 2 | |
| 3 | function initMap() { |
| 4 | // console.log("Inicializando mapa") |
| 5 | const posicion = { |
| 6 | lat: -25.363, |
| 7 | lng: 131.044 |
| 8 | } |
| 9 | |
| 10 | map = new google.maps.Map(document.getElementById("map"), { |
| 11 | zoom: 4, |
| 12 | center: posicion |
| 13 | }) |
| 14 | |
| 15 | marker = new google.maps.Marker({ |
| 16 | position: posicion, |
| 17 | map, |
| 18 | title: "Posición Inicial" |
| 19 | }) |
| 20 | // Obtener la geolocalización |
| 21 | // marker.setPosition({ lat, lng }) |
| 22 | geoPosiciona() |
| 23 | } |
| 24 | |
| 25 | function geoPosiciona() { |
| 26 | if (navigator.geolocation) { |
nothing calls this directly
no test coverage detected