Overview of the Data Module architecture
mainThe data module uses a Clean Architecture approach to separate parsing, modeling, and rendering:
- Parsers (
com.google.maps.android.data.parser): Converts raw files (KML, GeoJSON, GPX) into intermediate objects usingKmlParser,GeoJsonParser, orGpxParser. - Mappers (
com.google.maps.android.data.renderer.mapper): Transforms parsed objects into a unified internal model usingKmlMapper,GeoJsonMapper, orGpxMapper. - Internal Model (
com.google.maps.android.data.renderer.model): A platform-agnostic representation consisting of:DataScene: Top-level container.DataLayer: A collection of features.Feature: ContainsGeometry,Style, andProperties.Geometry: SupportsPoint,LineString,Polygon,MultiGeometry, andGroundOverlay.Style: SupportsPointStyle,LineStyle,PolygonStyle, andGroundOverlayStyle.
- Renderer (
com.google.maps.android.data.renderer.mapview): UsesMapViewRendererto draw the model onto aGoogleMap.