[Video](https://www.youtube.com/watch?v=mtKn3bo-MRc)

[Combine](https://developer.apple.com/documentation/combine) is a
framework for handling asynchronous events by combining event-processing
operators. Combine makes your code easier to read and maintain by centralizing
your event-processing code.

The [GoogleMapsPlatformCombine library](https://github.com/googlemaps/ios-combine)
is a Swift library that returns
[`Publishers`](https://developer.apple.com/documentation/combine/publisher)
for the Maps SDK for iOS and Places SDK for iOS so that you
can take advantage of the rich set of Combine features.

## Installation

For system requirements and installation instructions, see the
[GoogleMapsPlatformCombine library](https://github.com/googlemaps/ios-combine)
documentation on GitHub.

## Example usage

The GoogleMapsPlatformCombine library includes the
[`GMSMapViewPublisher`](https://github.com/googlemaps/ios-combine/blob/main/Sources/Maps/GMSMapViewPublisher.swift)
class that contains publisher properties that let you subscribe to events
emitted by the map.

Configure a `GMSMapViewPublisher` instance to subscribe to camera change events:

<br />

```yaml
let publisher = GMSMapViewPublisher(mapView: mapView)
publisher.didChangeCameraPosition.sink { cameraPosition in
  print("Camera position at \(cameraPosition.target)")
}
```

<br />

## What's next

- See the [Combine library](https://github.com/googlemaps/ios-combine) GitHub project page.