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 GeoJSON
format, using GMUGeoJSONParser, in
conjunction with GMUGeometryRenderer. GeoJSON is a popular
format for rendering geographic data such as points, lines, and polygons.
For the full code sample, see the sample apps
on
GitHub.
Rendering GeoJSON data
To render GeoJSON data on a map, create a GMUGeoJSONParser with
the path to a GeoJSON resource (GeoJSON_sample.kml in this
example). Then, create a GMUGeometryRenderer, passing the
GMUKMLParser instance. Finally, call
GMUGeometryRenderer.render(). The following code example shows
rendering GeoJSON 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 page demonstrates how to render geographic data in GeoJSON format on Google Maps using the `GMUGeoJSONParser` and `GMUGeometryRenderer`."],["GeoJSON is a commonly used format for displaying geographic data like points, lines, and polygons."],["You'll need to set up the Maps SDK for iOS Utility Library before using `GMUGeoJSONParser`."],["The provided code examples show how to render GeoJSON data on a map in both Swift and Objective-C."]]],[]]