Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 4, 2021 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/91391af8945d0fb09d5d0634c719f82d to your computer and use it in GitHub Desktop.
Save parzibyte/91391af8945d0fb09d5d0634c719f82d to your computer and use it in GitHub Desktop.
// Actualización de ubicación
mapa.getView().setCenter(ol.proj.fromLonLat([longitude, latitude]));
marcador.getGeometry().setCoordinates(ol.proj.fromLonLat([longitude, latitude]));
const fecha = formatearFecha(new Date(ubicacion.timestamp));
const registro = `Última actualización: ${fecha} en ${latitude},${longitude}`;
console.log(registro);
$estado.textContent = registro;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment