Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
Actualizar marcador de posición en un mapa de folleto

Estoy tratando de actualizar la posición del espectador en un mapa de folleto usando el watch: true como esta:

 var redIcon = new L.Icon({ iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png', shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png', iconSize: [25, 41], iconAnchor: [12, 41], popupAnchor: [1, -34], shadowSize: [41, 41] }); map.locate({setView: true, watch: true, maxZoom: 18}); function onLocationFound(e) { L.marker(e.latlng, {icon: redIcon}).addTo(map) } map.on('locationfound', onLocationFound);

Sin embargo, el marcador no actualiza su posición. ¿Tengo que envolver ese código dentro de otra función y hacer otra llamada? Cualquier pista será apreciada, ya que mi JS (conocimiento de programación) es muy básico.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!