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.
This page shows you how to render geographic data in the KML
format, using GMUKMLParser in
conjunction with GMUGeometryRenderer. KML is a popular
format for rendering geographic data such as points, lines, and polygons.
The following screenshot shows some example KML data rendered on a map:
For the full code sample, see the sample apps
on
GitHub.
Rendering KML data
To render KML data on a map, create a GMUKMLParser with the
path to a KML resource (KML_Sample.kml in this example). Then,
create a GMUGeometryRenderer passing the GMUKMLParser
instance. Finally, call GMUGeometryRenderer.render(). The
following code example shows rendering KML data on a map:
[[["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."],[[["This documentation explains how to render geographic data in KML format using the `GMUKMLParser` and `GMUGeometryRenderer` within the Google Maps SDK for iOS Utility Library."],["KML is a popular format used for displaying geographic data, including points, lines, and polygons, on maps."],["To render KML data, create a `GMUKMLParser` instance with the path to your KML file, then use it to initialize a `GMUGeometryRenderer`, and finally, call `render()` on the renderer to display the data on your map."],["Code examples in both Swift and Objective-C are provided to demonstrate the process of rendering KML data on a map using the Google Maps SDK for iOS."]]],[]]