Skip to content

Google Maps MapViewHolder

GoogleMapViewState.getMapViewHolder() devuelve AnyMapViewHolder?. El objeto nativo de Google Maps se almacena como Any y puede hacerse cast a GMSMapView.

import GoogleMaps
if let holder = mapViewState.getMapViewHolder(),
let mapView = holder.mapView as? GMSMapView {
mapView.mapType = .hybrid
}

Usa toScreenOffset(position:) y fromScreenOffset(offset:) para la conversión de coordenadas sin hacer cast al tipo nativo del SDK.