A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/googlemaps/google-maps-ios-utils below:

googlemaps/google-maps-ios-utils: Google Maps SDK for iOS Utility Library

Google Maps SDK for iOS Utility Library

This open-source library contains classes that are useful for a wide range of applications using the Google Maps SDK for iOS.

  1. Include the GoogleMaps dependency using one of the available installation options (Swift Package Manager, CocoaPods, or manual).

  2. Add this utility library using one of the options below:

  1. Follow the instructions for adding package dependencies to your app in Xcode.

  2. In the "Enter Package URL" field, enter this GitHub repository:

https://github.com/googlemaps/google-maps-ios-utils

Important

You also need to install the Maps SDK for iOS, which is also supported in Swift Package Manager at the URL https://github.com/googlemaps/ios-maps-sdk

  1. Select the version of the Maps SDK for iOS Utility Library that you want to use. For new projects, we recommend specifying the latest version and using the "Up to next Major" option. See Release Notes for this library and the Maps SDK for iOS to select the correct version for you.

  2. Follow the instructions to add your API key to your app.

  3. See the Importing section for import statements specific to SPM installation.

  1. In your Podfile:
use_frameworks!

target 'TARGET_NAME' do
  pod 'GoogleMaps', '10.0.0'
  pod 'Google-Maps-iOS-Utils', '6.1.2' # x-release-please-version
end

(You can omit the comment "x-release-please-start-version" which is used for release automation.) Replace TARGET_NAME and save the Podfile.

  1. At the command line in directory containing your Podfile, run:
  1. Open the .xcworkspace file that is created.

  2. Follow the instructions to add your API key to your app.

  3. See the Importing section for import statements specific to CocoaPods installation.

Only supported if using Maps SDK v6.1.2 or earlier

In your Cartfile:

github "googlemaps/google-maps-ios-utils" ~> 6.1.2

See the Carthage doc for further installation instructions.

See the README for the Swift and Objective-C samples apps in /samples.

Read documentation about this utility library on developers.google.com or within the /docs directory.

You may also need to import GoogleMaps.

Swift:

Objective-C:

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()
import GoogleMaps
import GoogleMapsUtils

func renderKml() {
    // Parse KML
    let path: String = // Path to your KML file...
    let kmlUrl = URL(fileURLWithPath: path)
    let kmlParser = GMUKmlParser(url: kmlUrl)
    kmlParser.parse()

    // Render parsed KML
    let renderer = GMUGeometryRenderer(
        map: mapView,
        geometries: kmlParser.placemarks,
        styles: kmlParser.styles,
        styleMaps: kmlParser.styleMaps
    )
    renderer.render()
}

Contributions are welcome and encouraged. Please see the contributing guide for guidance.

This library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform Terms of Service.

European Economic Area (EEA) developers

If your billing address is in the European Economic Area, effective on 8 July 2025, the Google Maps Platform EEA Terms of Service will apply to your use of the Services. Learn more.

This library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.

This library is offered via an open source license. It is not governed by the Google Maps Platform Support Technical Support Services Guidelines, the SLA, or the Deprecation Policy (however, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service).

This library adheres to semantic versioning to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.

If you find a bug, or have a feature request, please file an issue on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our developer community channels. If you'd like to contribute, please check the contributing guide.

You can also discuss this library on our Discord server.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4