Looking for advanced features to add to your maps? The Maps SDK for iOS Utility Library on GitHub is an open-source library of classes that are useful for a range of applications. The GitHub repository includes the utility classes and a demo app that illustrates the use of each class.
Run the demo app by using one of these two methods:
Use files from GitHub
- Download the code sample archive from GitHub and unpack the archive.
- Open a terminal window, navigate to the directory where you expanded the sample files, and
drill down into the appropriate samples directory for the language you want to use:
- For Swift, run
- For Objective-C, run
- For Swift, run
- Run the following command:
- CocoaPods updates your spec repositories, then opens the demo in a temporary Xcode project
Use CocoaPods v1.6.1
- Open a terminal window and install version 1.6.1:
sudo gem install cocoapods -v1.6.1
- Fetch the Google Maps files using Cocoapods:
pod try Google-Maps-iOS-Utils
Choose either Swift or Objective-C when prompted. CocoaPods updates your spec repositories, then opens the demo in a temporary Xcode project named
For more details, follow the setup guide.
GMUClusterManager helps you manage multiple markers at
different zoom levels. This means you can put a large number of markers
on a map without making the map hard to read. When a user views the map
at a high zoom level, the individual markers show on the map. When the
user zooms out to a lower zoom level, the markers gather together into
clusters, to make viewing the map easier.
A quadtree is a data structure that's useful for finding points near a single point, by searching inside an area surrounding the point of interest.
KML and GeoJSON are popular formats for rendering geographic data such as
points, lines, and polygons. The
GMUGeoJSONParser let you parse and render geographic data in
KML and GeoJSON formats, respectively.
Heatmaps make it easy for viewers to understand the distribution and relative intensity of data points on a map. Rather than placing a marker at each location, heatmaps use color and shape to represent the distribution of data.