コンテンツにスキップ

Google Maps MapViewHolder

GoogleMapViewState.getMapViewHolder()AnyMapViewHolder? を返します。ネイティブの Google Maps オブジェクトは Any として保存されており、GMSMapView にキャストできます。

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

ネイティブ SDK の型にキャストせずに座標変換を行うには、toScreenOffset(position:)fromScreenOffset(offset:) を使用してください。