라이브러리 결합
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Combine은
이벤트 처리 연산자를 결합하여 비동기 이벤트를 처리하기 위한 프레임워크입니다.
Combine을 사용하면 이벤트 처리 코드를 중앙 집중화하여 더 쉽게 코드를 읽고 유지관리할 수 있습니다.
GoogleMapsPlatformCombine 라이브러리
Swift 라이브러리로
Publishers
iOS용 Maps SDK 및 iOS용 Places SDK를 제공합니다.
확인할 수 있습니다.
설치
GoogleMapsPlatformCombine 라이브러리를 참조하세요.
GitHub 문서에서 최신 시스템 요구사항 및 설치 안내를 확인하세요.
사용 예
GoogleMapsPlatformCombine 라이브러리에는
GMSMapViewPublisher
클래스
지도에서 내보낸 이벤트를 구독할 수 있는 게시자 속성이 포함되어 있습니다.
다음 예시에서는 GMSMapViewPublisher
인스턴스를 구성하여
카메라 변경 이벤트:
let publisher = GMSMapViewPublisher(mapView: mapView)
publisher.didChangeCameraPosition.sink { cameraPosition in
print("Camera position at \(cameraPosition.target)")
}
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-12(UTC)
[null,null,["최종 업데이트: 2025-09-12(UTC)"],[],["The content introduces the GoogleMapsPlatformCombine library, which utilizes Apple's Combine framework for handling asynchronous events within the Google Maps and Places SDKs for iOS. It leverages `Publishers` to manage events. A key action is demonstrated through the `GMSMapViewPublisher` class, allowing users to subscribe to map events. An example illustrates how to monitor camera position changes using the `didChangeCameraPosition` publisher. Installation instructions and further details are available on the library's GitHub page.\n"],null,[]]