Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

166
Vistas
iOS - Animate to a location while showing all the markers in GMSMapView

I want to animate to a specific location while showing all the markers i have pinned on Google map .

I am able to animate to a location but it is not showing all the markers.

I have tried the following solution (answer link) .

I am calling hover(to location:) for each location i want to animate:

func viewAllMarkers() {
  var bounds = GMSCoordinateBounds()
  for marker in yourArrayOfMarkers {
        bounds = bounds.includingCoordinate(marker.position)
  }
  let update = GMSCameraUpdate.fit(bounds, withPadding: 60)
  mapView.animate(with: update)
}

func hover(to location: CLLocationCoordinate2D) {
   viewAllMarkers()
   mapView?.animate(toLocation: location)
}

But it does not work . It animates to a location but does not show all the markers in GMSMapView . How to do both at the same time ?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda