# t0biascze/mapyczwindowsphone architecture

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

- Interactive diagram: https://gitdiagram.com/t0biascze/mapyczwindowsphone
- Repository: https://github.com/t0biascze/mapyczwindowsphone

## Overview

This is a Windows Phone Mapy.cz mapping client, with a map-centric workflow: users view and interact with a map, search for places, inspect POIs, plan routes, and optionally share location or manage reviews. The map view connects app modules to 2D tile rendering and a 3D terrain renderer; service clients and shared protocol code support discovery and navigation. The source index provides the relationship evidence below; unsampled subsystems are included where the tree shows a major capability, but uncertain connections are omitted.

Main entry points: [`MapyCzWpSilverlight/SurfaceRenderer.cs`](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpSilverlight/SurfaceRenderer.cs) (Map surface), [`MapyCzWpClientRT/Map/MapView.xaml.cs`](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Map/MapView.xaml.cs) (Map view), [`MapRender.Engine/Platform/MapyHttpClient.cs`](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Platform/MapyHttpClient.cs) (Mapy HTTP client), [`MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs`](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs) (Map texture manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and map UI"]
  node_app["App lifecycle<br/>[App.xaml.cs]"]
  node_mapview["Map view<br/>[MapView.xaml.cs]"]
  node_transform["View transform"]
  node_loc["Language selection<br/>[Loc.cs]"]
end

subgraph group_render["Map rendering"]
  node_tile2d["2D tile renderer<br/>[TileRenderer.cs]"]
  node_surface["Map surface<br/>[SurfaceRenderer.cs]"]
  node_terrain["Terrain renderer<br/>[TerrainRenderer.cs]"]
  node_gpu["GPU context<br/>[GpuContext.cs]"]
  node_height["Terrain height field<br/>[HeightField.cs]"]
  node_camera["Terrain camera"]
  node_quadtree["Terrain quadtree<br/>[TerrainQuadtree.cs]"]
  node_overlays["Terrain overlays<br/>[OverlayModel.cs]"]
  node_maptextures["Map texture manager"]
end

subgraph group_discovery["Places and routes"]
  node_searchui["Search panel"]
  node_searchclient["Place search<br/>[SearchClient.cs]"]
  node_searchphotos["Search photos"]
  node_poi["POI services<br/>[PoiPhotosClient.cs]"]
  node_routeclient["Route planner client"]
end

subgraph group_shared["Shared data and protocols"]
  node_routeplan["Route plan model<br/>[RoutePlan.cs]"]
  node_routeprotocol["Route protocol"]
  node_bbox["POI bounds<br/>[BoundingBox.cs]"]
  node_photoformat["Photo batch protocol"]
  node_frpc["FRPC reader and writer<br/>[FrpcReader.cs]"]
end

subgraph group_account["Account and sharing"]
  node_http["Mapy HTTP client<br/>[MapyHttpClient.cs]"]
  node_auth["Seznam authentication<br/>[SznAuth.cs]"]
  node_sharing["Location sharing service<br/>[SharingService.cs]"]
  node_reviews["Reviews API<br/>[ReviewsApi.cs]"]
end

node_user(("Map user"))
node_external(("Mapy.cz services"))

node_user -->|"uses"| node_mapview
node_app -->|"hosts"| node_mapview
node_mapview -->|"uses"| node_transform
node_surface -->|"renders with"| node_terrain
node_surface -->|"uses"| node_camera
node_surface -->|"reads"| node_overlays
node_surface -->|"renders with"| node_tile2d
node_maptextures -->|"uploads textures"| node_gpu
node_maptextures -->|"streams tiles"| node_height
node_maptextures -->|"budgets nodes"| node_quadtree
node_searchui -->|"searches"| node_searchclient
node_searchui -->|"fetches thumbnails"| node_searchphotos
node_searchui -->|"uses bounds"| node_bbox
node_searchphotos -->|"builds batch"| node_photoformat
node_searchclient -->|"sends requests"| node_http
node_searchphotos -->|"fetches batch"| node_http
node_poi -->|"requests media"| node_http
node_routeclient -->|"encodes plan"| node_routeprotocol
node_routeclient -->|"uses model"| node_routeplan
node_routeprotocol -->|"serializes"| node_routeplan
node_searchclient -->|"uses bounds"| node_bbox
node_photoformat -->|"encodes and decodes"| node_frpc
node_routeprotocol -->|"encodes and decodes"| node_frpc
node_http -->|"calls"| node_external
node_sharing -->|"signs in"| node_auth
node_reviews -->|"gets access token"| node_auth
node_sharing -->|"uploads position"| node_external
node_reviews -->|"calls review API"| node_external
node_mapview -->|"uses localization"| node_loc

click node_app "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/App.xaml.cs"
click node_mapview "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Map/MapView.xaml.cs"
click node_transform "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Map/MapViewTransform.cs"
click node_tile2d "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Render/TileRenderer.cs"
click node_surface "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpSilverlight/SurfaceRenderer.cs"
click node_terrain "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainRenderer.cs"
click node_gpu "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Gpu/GpuContext.cs"
click node_height "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/HeightField.cs"
click node_camera "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainCameraState.cs"
click node_quadtree "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainQuadtree.cs"
click node_overlays "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Overlays/OverlayModel.cs"
click node_maptextures "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs"
click node_searchui "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Controls/SearchPanel.xaml.cs"
click node_searchclient "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Search/SearchClient.cs"
click node_searchphotos "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Search/SearchPhotoClient.cs"
click node_poi "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Poi/PoiPhotosClient.cs"
click node_routeclient "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Route/RoutePlannerClient.cs"
click node_routeplan "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Route/RoutePlan.cs"
click node_routeprotocol "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Route/RoutePlanProtocol.cs"
click node_bbox "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Poi/BoundingBox.cs"
click node_photoformat "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Poi/PoiPhotoBatchProtocol.cs"
click node_frpc "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Frpc/FrpcReader.cs"
click node_http "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Platform/MapyHttpClient.cs"
click node_auth "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Sharing/SznAuth.cs"
click node_sharing "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Core/SharingService.cs"
click node_reviews "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Reviews/ReviewsApi.cs"
click node_loc "https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Platform/Loc.cs"

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_app,node_mapview,node_transform,node_loc,node_user toneBlue
class node_tile2d,node_surface,node_terrain,node_gpu,node_height,node_camera,node_quadtree,node_overlays,node_maptextures toneAmber
class node_searchui,node_searchclient,node_searchphotos,node_poi,node_routeclient toneMint
class node_routeplan,node_routeprotocol,node_bbox,node_photoformat,node_frpc toneRose
class node_http,node_auth,node_sharing,node_reviews,node_external toneIndigo
```

## Components

### App and map UI

- [App lifecycle](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/App.xaml.cs): `MapyCzWpClientRT/App.xaml.cs`
- [Map view](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Map/MapView.xaml.cs): `MapyCzWpClientRT/Map/MapView.xaml.cs`
- [View transform](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Map/MapViewTransform.cs): `MapRender.Engine/Map/MapViewTransform.cs`
- [Language selection](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Platform/Loc.cs): `MapyCzWpClientRT/Platform/Loc.cs`

### Map rendering

- [2D tile renderer](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Render/TileRenderer.cs): `MapRender.Shared/Render/TileRenderer.cs`
- [Map surface](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpSilverlight/SurfaceRenderer.cs): `MapyCzWpSilverlight/SurfaceRenderer.cs`
- [Terrain renderer](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainRenderer.cs): `MapRender.Engine/Terrain3D/TerrainRenderer.cs`
- [GPU context](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Gpu/GpuContext.cs): `MapRender.Engine/Terrain3D/Gpu/GpuContext.cs`
- [Terrain height field](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/HeightField.cs): `MapRender.Engine/Terrain3D/HeightField.cs`
- [Terrain camera](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainCameraState.cs): `MapRender.Engine/Terrain3D/TerrainCameraState.cs`
- [Terrain quadtree](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/TerrainQuadtree.cs): `MapRender.Engine/Terrain3D/TerrainQuadtree.cs`
- [Terrain overlays](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Overlays/OverlayModel.cs): `MapRender.Engine/Terrain3D/Overlays/OverlayModel.cs`
- [Map texture manager](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs): `MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs`

### Places and routes

- [Search panel](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Controls/SearchPanel.xaml.cs): `MapyCzWpClientRT/Controls/SearchPanel.xaml.cs`
- [Place search](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Search/SearchClient.cs): `MapRender.Engine/Modules/Search/SearchClient.cs`
- [Search photos](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Search/SearchPhotoClient.cs): `MapRender.Engine/Modules/Search/SearchPhotoClient.cs`
- [POI services](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Poi/PoiPhotosClient.cs): `MapRender.Engine/Modules/Poi/PoiPhotosClient.cs`
- [Route planner client](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Modules/Route/RoutePlannerClient.cs): `MapRender.Engine/Modules/Route/RoutePlannerClient.cs`

### Shared data and protocols

- [Route plan model](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Route/RoutePlan.cs): `MapRender.Shared/Route/RoutePlan.cs`
- [Route protocol](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Route/RoutePlanProtocol.cs): `MapRender.Shared/Route/RoutePlanProtocol.cs`
- [POI bounds](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Poi/BoundingBox.cs): `MapRender.Shared/Poi/BoundingBox.cs`
- [Photo batch protocol](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Poi/PoiPhotoBatchProtocol.cs): `MapRender.Shared/Poi/PoiPhotoBatchProtocol.cs`
- [FRPC reader and writer](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Shared/Frpc/FrpcReader.cs): `MapRender.Shared/Frpc/FrpcReader.cs`

### Account and sharing

- [Mapy HTTP client](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapRender.Engine/Platform/MapyHttpClient.cs): `MapRender.Engine/Platform/MapyHttpClient.cs`
- [Seznam authentication](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Sharing/SznAuth.cs): `MapyCzWpClientRT/Sharing/SznAuth.cs`
- [Location sharing service](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Core/SharingService.cs): `MapyCzWpClientRT/Core/SharingService.cs`
- [Reviews API](https://github.com/t0biascze/mapyczwindowsphone/blob/master/MapyCzWpClientRT/Reviews/ReviewsApi.cs): `MapyCzWpClientRT/Reviews/ReviewsApi.cs`

### Other components

- **Map user**
- **Mapy.cz services**

## Connections

- Map user → Map view: uses (evidence: `MapyCzWpClientRT/Map/MapView.xaml.cs`)
- App lifecycle → Map view: hosts (evidence: `MapyCzWpClientRT/App.xaml.cs`)
- Map view → View transform: uses (evidence: `MapyCzWpClientRT/Map/MapView.xaml.cs`)
- Map surface → Terrain renderer: renders with (evidence: `MapyCzWpSilverlight/SurfaceRenderer.cs`)
- Map surface → Terrain camera: uses (evidence: `MapyCzWpSilverlight/SurfaceRenderer.cs`)
- Map surface → Terrain overlays: reads (evidence: `MapyCzWpSilverlight/SurfaceRenderer.cs`)
- Map surface → 2D tile renderer: renders with (evidence: `MapyCzWpSilverlight/SurfaceRenderer.cs`)
- Map texture manager → GPU context: uploads textures (evidence: `MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs`)
- Map texture manager → Terrain height field: streams tiles (evidence: `MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs`)
- Map texture manager → Terrain quadtree: budgets nodes (evidence: `MapRender.Engine/Terrain3D/Layers/MapTextureManager.cs`)
- Search panel → Place search: searches (evidence: `MapyCzWpClientRT/Controls/SearchPanel.xaml.cs`)
- Search panel → Search photos: fetches thumbnails (evidence: `MapyCzWpClientRT/Controls/SearchPanel.xaml.cs`)
- Search panel → POI bounds: uses bounds (evidence: `MapyCzWpClientRT/Controls/SearchPanel.xaml.cs`)
- Search photos → Photo batch protocol: builds batch (evidence: `MapRender.Engine/Modules/Search/SearchPhotoClient.cs`)
- Place search → Mapy HTTP client: sends requests (evidence: `MapRender.Engine/Modules/Search/SearchClient.cs`)
- Search photos → Mapy HTTP client: fetches batch (evidence: `MapRender.Engine/Modules/Search/SearchPhotoClient.cs`)
- POI services → Mapy HTTP client: requests media (evidence: `MapRender.Engine/Modules/Poi/PoiPhotosClient.cs`)
- Route planner client → Route protocol: encodes plan (evidence: `MapRender.Engine/Modules/Route/RoutePlannerClient.cs`)
- Route planner client → Route plan model: uses model (evidence: `MapRender.Engine/Modules/Route/RoutePlannerClient.cs`)
- Route protocol → Route plan model: serializes (evidence: `MapRender.Shared/Route/RoutePlanProtocol.cs`)
- Place search → POI bounds: uses bounds (evidence: `MapRender.Engine/Modules/Search/SearchClient.cs`)
- Photo batch protocol → FRPC reader and writer: encodes and decodes (evidence: `MapRender.Shared/Poi/PoiPhotoBatchProtocol.cs`)
- Route protocol → FRPC reader and writer: encodes and decodes (evidence: `MapRender.Shared/Route/RoutePlanProtocol.cs`)
- Mapy HTTP client → Mapy.cz services: calls (evidence: `MapRender.Engine/Platform/MapyHttpClient.cs`)
- Location sharing service → Seznam authentication: signs in (evidence: `MapyCzWpClientRT/Core/SharingService.cs`)
- Reviews API → Seznam authentication: gets access token (evidence: `MapyCzWpClientRT/Reviews/ReviewsApi.cs`)
- Location sharing service → Mapy.cz services: uploads position (evidence: `MapyCzWpClientRT/Core/SharingService.cs`)
- Reviews API → Mapy.cz services: calls review API (evidence: `MapyCzWpClientRT/Reviews/ReviewsApi.cs`)
- Map view → Language selection: uses localization (evidence: `MapyCzWpClientRT/Map/MapView.xaml.cs`)
