¿Estás buscando funciones avanzadas para agregarlas a tus mapas? La biblioteca de utilidades del SDK de Maps para iOS en GitHub es una biblioteca de clases de código abierto que resulta útil para diferentes aplicaciones. En el repositorio de GitHub se incluyen las clases de utilidades y una app de demostración que ilustra el uso de cada clase.
Las utilidades
Agrupamiento de marcadores en clústeres
GMUClusterManager te permite administrar varios marcadores con diferentes niveles de zoom. Esto significa que puedes incluir muchos marcadores en un mapa sin que esto dificulte su lectura. Cuando un usuario visualiza el mapa con un alto nivel de zoom, aparecen los marcadores individuales. Cuando el usuario aleja el mapa, los marcadores se agrupan en clústeres para facilitar su visualización.
Un quadtree es una estructura de datos que resulta útil para encontrar puntos cerca de un solo punto mediante la búsqueda en un área que rodea el lugar de interés.
Para obtener información detallada, consulta la documentación de Quadtree.
KML
KML es un formato popular para renderizar datos geográficos como puntos, líneas y polígonos. El objeto GMUKMLParser te permite analizar y renderizar datos geográficos en formato KML.
Para obtener información detallada, consulta la documentación sobre el KML.
Cómo importar GeoJSON a tu mapa
Puedes almacenar componentes en formato GeoJSON y usar esta utilidad para renderizarlos como una capa sobre el mapa.
Renderiza datos geográficos en el formato GeoJSON mediante GMUGeoJSONParser junto con GMUGeometryRenderer.
Para obtener información detallada, consulta la documentación sobre GeoJSON.
Mapas de calor
Los mapas de calor permiten a los usuarios comprender la distribución y la intensidad relativa de los datos de un mapa de manera sencilla. En los mapas de calor, en lugar de colocar un marcador en cada ubicación, se usan colores y formas para representar la distribución de los datos.
Para obtener detalles, consulta la documentación sobre los mapas de calor.
Marcadores personalizados
Usa el delegado GMUClusterRendererDelegate en GMUDefaultClusterRenderer para personalizar las propiedades de un marcador antes y después de agregarlo al mapa.
Utilidades de geometría
Un conjunto de funciones de utilidad de geometría esférica de Swift del módulo GMSGeometryUtils del SDK de Maps para iOS. Usa estas extensiones para realizar muchos tipos de operaciones geométricas, incluidas las siguientes:
Determinar la gran distancia de un círculo entre coordenadas
Determinar si una coordenada está dentro de un polígono
Determinar si una coordenada se encuentra en una ruta de acceso o cerca de ella dentro de una tolerancia especificada
[null,null,["Última actualización: 2025-07-26 (UTC)"],[[["\u003cp\u003eThe Maps SDK for iOS Utility Library is an open-source library providing advanced features for your maps.\u003c/p\u003e\n"],["\u003cp\u003eThis library offers utilities for marker clustering, quadtrees, KML parsing, GeoJSON rendering, heatmaps, custom markers, and geometry operations.\u003c/p\u003e\n"],["\u003cp\u003eThe library includes a demo app demonstrating the use of each class.\u003c/p\u003e\n"],["\u003cp\u003eAccess the Maps SDK for iOS Utility Library and its documentation on GitHub.\u003c/p\u003e\n"]]],["The Maps SDK for iOS Utility Library offers tools for enhancing maps, including marker clustering via `GMUClusterManager` for managing numerous markers at different zoom levels. It also supports quadtrees for proximity searches, KML and GeoJSON format parsing for rendering geographic data, and heatmaps for visualizing data density. The library allows custom marker properties through `GMUClusterRendererDelegate` and provides geometry utilities (`GMSGeometryUtils`) for tasks like distance calculation and polygon analysis.\n"],null,["Select platform: [Android](/maps/documentation/android-sdk/utility \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/utility \"View this page for the iOS platform docs.\")\n\nLooking for advanced features to add to your maps? The\n[Maps SDK for iOS\nUtility Library](https://github.com/googlemaps/google-maps-ios-utils) on GitHub is an open-source library of classes that are\nuseful for a range of applications. The GitHub repository includes the utility\nclasses and a demo app that illustrates the use of each class.\n\nThe utilities\n\n|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Marker Clustering The `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. For details, see the documentation on the [Marker Clustering](/maps/documentation/ios-sdk/utility/marker-clustering). |\n| No image for this utility. | Quadtree 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. For details, see the documentation on the [Quadtree](/maps/documentation/ios-sdk/utility/quadtree). |\n| | KML KML is a popular format for rendering geographic data such as points, lines, and polygons. The `GMUKMLParser` lets you parse and render geographic data in the KML format. For details, see the documentation on the [KML](/maps/documentation/ios-sdk/utility/kml). |\n| | Import GeoJSON onto your map You can store features in [GeoJSON](http://geojson.org/) format and use this utility to render them as a layer on top of a map. Render geographic data in the GeoJSON format using `GMUGeoJSONParser` in conjunction with `GMUGeometryRenderer`. For details, see the documentation on the [GeoJSON](/maps/documentation/ios-sdk/utility/geojson). |\n| | Heatmaps 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. For details, see the documentation on the [Heatmaps](/maps/documentation/ios-sdk/utility/heatmap). |\n| | Custom markers Use the delegate [`GMUClusterRendererDelegate`](https://github.com/googlemaps/google-maps-ios-utils/blob/master/src/Clustering/View/GMUDefaultClusterRenderer.h) on `GMUDefaultClusterRenderer` to customize the properties of a marker before and after it is added to the map. |\n| | Geometry utilities A set of Swift spherical geometry utility functions of the [`GMSGeometryUtils`](/maps/documentation/ios-sdk/reference/objc/Functions) module of the Maps SDK for iOS. Use these extensions to perform many types of geometric operations, including: - Determine the great circle distance between coordinates - Determine if a coordinate is inside a polygon - Determine if a coordinate lies on or near a path within a specified tolerance - Determine the area of this polygon - many others |"]]