# renaudcerrato/static-maps-api architecture

> Architecture diagram of the GitHub repository renaudcerrato/static-maps-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/renaudcerrato/static-maps-api
- Repository: https://github.com/renaudcerrato/static-maps-api

## Overview

This repository provides a fluent Java API for configuring Google Static Maps requests and producing a URL for an image-loading client. The main workflow is to set map options and geographic content, serialize the configuration, then let a client fetch and display the resulting map. The library also supports map types, visible points, styled markers, and styled or filled paths. The excerpts show URL and polyline helpers; the demo’s broader runtime wiring was not sampled, so it is not expanded here.

Main entry points: [`library/src/main/java/com/mypopsy/maps/StaticMap.java`](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java) (Map configuration), [`library/src/main/java/com/mypopsy/maps/internal/PolyLine.java`](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/PolyLine.java) (Polyline encoder), [`library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java`](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java) (URL builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Map API"]
  node_map["Map configuration<br/>[StaticMap.java]"]
  node_markers["Styled markers<br/>[StaticMap.java]"]
  node_paths["Styled paths<br/>[StaticMap.java]"]
end

subgraph group_encoding["URL Encoding"]
  node_polyline["Polyline encoder<br/>[PolyLine.java]"]
  node_urlbuilder["URL builder<br/>[UrlBuilder.java]"]
end

subgraph group_integration["Client Integration"]
  node_client["Image-loading client"]
  node_image["Map image"]
end

node_developer(("Application developer"))
node_google{{"Google Static Maps"}}

node_developer -->|"configures"| node_map
node_developer -->|"adds markers"| node_markers
node_developer -->|"adds paths"| node_paths
node_map -->|"encodes paths"| node_polyline
node_map -->|"builds query"| node_urlbuilder
node_map -->|"provides URL"| node_client
node_client -->|"fetches map"| node_google
node_google -->|"returns image"| node_image

click node_map "https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java"
click node_markers "https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java"
click node_paths "https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java"
click node_polyline "https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/PolyLine.java"
click node_urlbuilder "https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_map,node_markers,node_paths toneBlue
class node_polyline,node_urlbuilder toneAmber
class node_client,node_image toneMint
class node_developer,node_google toneIndigo
```

## Components

### Map API

- [Map configuration](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java): `library/src/main/java/com/mypopsy/maps/StaticMap.java`
- [Styled markers](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java): `library/src/main/java/com/mypopsy/maps/StaticMap.java`
- [Styled paths](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/StaticMap.java): `library/src/main/java/com/mypopsy/maps/StaticMap.java`

### URL Encoding

- [Polyline encoder](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/PolyLine.java): `library/src/main/java/com/mypopsy/maps/internal/PolyLine.java`
- [URL builder](https://github.com/renaudcerrato/static-maps-api/blob/master/library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java): `library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java`

### Client Integration

- **Image-loading client**
- **Map image**

### Other components

- **Application developer**
- **Google Static Maps**

## Connections

- Application developer → Map configuration: configures (evidence: `README.md`)
- Application developer → Styled markers: adds markers (evidence: `README.md`)
- Application developer → Styled paths: adds paths (evidence: `README.md`)
- Map configuration → Polyline encoder: encodes paths (evidence: `library/src/main/java/com/mypopsy/maps/StaticMap.java`)
- Map configuration → URL builder: builds query (evidence: `library/src/main/java/com/mypopsy/maps/StaticMap.java`)
- Map configuration → Image-loading client: provides URL (evidence: `README.md`)
- Image-loading client → Google Static Maps: fetches map (evidence: `README.md`)
- Google Static Maps → Map image: returns image (evidence: `README.md`)
