Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-release with XCFramework and improve README #447

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ range of applications using the [Google Maps SDK for iOS][sdk].

## Installation

1. [Include the `GoogleMaps` dependency](https://developers.google.com/maps/documentation/ios-sdk/config#download-sdk) using one of the available installation options (CocoaPods, XCFramework, Carthage (for v6.2.1 and earlier) or manual).

1. Add this utility library using one of the methods below:

### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)

In your `Podfile`:
Expand Down Expand Up @@ -75,8 +79,6 @@ github "googlemaps/google-maps-ios-utils" ~> 4.1.0
See the [Carthage doc] for further installation instructions.
</details>

In addition to this, you will also have to include the `GoogleMaps` dependency using one of the available installation options (CocoaPods, XCFramework, Carthage (for v6.2.1 and earlier) or manual).

## Sample App

See the README for the Swift and Objective-C samples apps in [/samples](samples).
Expand All @@ -87,9 +89,45 @@ Read documentation about this utility library on [developers.google.com][devsite

## Usage

### Clustering markers

```swift
import GoogleMaps
import GoogleMapsUtils

class MarkerClustering: UIViewController, GMSMapViewDelegate {
private var mapView: GMSMapView!
private var clusterManager: GMUClusterManager!

override func viewDidLoad() {
super.viewDidLoad()

// Set up the cluster manager with the supplied icon generator and
// renderer.
let iconGenerator = GMUDefaultClusterIconGenerator()
let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm()
let renderer = GMUDefaultClusterRenderer(mapView: mapView,
clusterIconGenerator: iconGenerator)
clusterManager = GMUClusterManager(map: mapView, algorithm: algorithm,
renderer: renderer)

// Register self to listen to GMSMapViewDelegate events.
clusterManager.setMapDelegate(self)
// ...
}
// ...
}

let markerArray = [marker1, marker2, marker3, marker4] // define your own markers
clusterManager.add(markerArray)

clusterManager.cluster()
```

### Displaying KML data

```swift
import GoogleMaps
import GoogleMapsUtils

func renderKml() {
Expand Down