MCPcopy Create free account
hub / github.com/Open-Bootcamp/JavaScript-Basico / geoPosiciona

Function geoPosiciona

sesion-17-maps/index.js:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25function geoPosiciona() {
26 if (navigator.geolocation) {
27 const geoLoc = navigator.geolocation
28 const options = { timeout: 60000 }
29 const watchPos = geoLoc.watchPosition(centraMapa, onError, options)
30 } else {
31 alert("Tu navegador no admite geolocalización")
32 }
33}
34
35function centraMapa(position) {
36 const nuevaPos = {

Callers 1

initMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected