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

223
Views
Actualizar el tamaño de un círculo en la actualización del radio Google Maps v3

Soy nuevo en javascript y trato de actualizar el tamaño de un círculo en un mapa de Google cuando se actualiza el valor del radio, pero no funciona.

Traté de devolver el valor de cityCircle cuando actualicé el radio pero devuelve "indefinido".

 setTimeout(function() { google.maps.event.trigger(map, 'resize'); if (num_places > 0) { var radiusmap = s.radius; var cityCircle; function addCircle() { if (cityCircle) { cityCircle.setMap(null); } else { cityCircle = new google.maps.Circle({ radius: radiusmap * 1000, fillColor: '#bce3e4', fillOpacity: 0.2, strokeColor: '#7cc4c5', strokeOpacity: 1, strokeWeight: 1 }); cityCircle.bindTo('center', centerMarker, 'position'); cityCircle.bindTo('map', centerMarker, 'map'); } } if (radiusmap == 100) { addCircle(); map.setCenter(latlng); map.setZoom(8); } if (radiusmap == 50) { console.log(cityCircle); addCircle(); map.setZoom(9); } if (radiusmap == 20) { addCircle(); map.setZoom(10); } if (radiusmap == 5) { addCircle(); map.setZoom(12); } if (radiusmap == 0) { map.setZoom(2); } } else { map.setZoom(s.zoom); map.setCenter(latlng); } }

Cualquier ayuda sería muy apreciada :)

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!