New basemap styling is coming soon to Google Maps Platform. This update to map styling includes a new default color palette, modernized pins, and improvements to map experiences and usability. All map styles will be automatically updated in March 2025. For more information on availability and how to opt in earlier, see New map style for Google Maps Platform.
Stay organized with collections
Save and categorize content based on your preferences.
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
is a Swift library that returns
Publishers
for the Maps SDK for iOS and Places SDK for iOS so that you can take advantage
of the rich set of Combine features.
The GoogleMapsPlatformCombine library includes the
GMSMapViewPublisher class
which contains publisher properties that let you subscribe to events emitted by the map.
The following example configures a GMSMapViewPublisher instance to subscribe to
camera change events:
let publisher = GMSMapViewPublisher(mapView:mapView)publisher.didChangeCameraPosition.sink { cameraPosition inprint("Camera position at \(cameraPosition.target)")}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-29 UTC."],[[["GoogleMapsPlatformCombine is a Swift library that integrates the Maps SDK for iOS and Places SDK for iOS with Apple's Combine framework."],["This library provides Publishers for various SDK functionalities, allowing developers to leverage Combine's features for asynchronous event handling."],["By using GoogleMapsPlatformCombine, developers can simplify their code and centralize event-processing logic for Google Maps and Places SDKs within their applications."],["A practical example demonstrates subscribing to camera change events on a `GMSMapView` using the `GMSMapViewPublisher` and Combine's `sink` operator."]]],[]]