diff --git a/examples/basic-server-react/grid-cell.png b/examples/basic-server-react/grid-cell.png index 926846fe..79d2b87f 100644 Binary files a/examples/basic-server-react/grid-cell.png and b/examples/basic-server-react/grid-cell.png differ diff --git a/examples/basic-server-react/screenshot.png b/examples/basic-server-react/screenshot.png index 1c9df5ad..fd317dd3 100644 Binary files a/examples/basic-server-react/screenshot.png and b/examples/basic-server-react/screenshot.png differ diff --git a/examples/cohort-heatmap-server/grid-cell.png b/examples/cohort-heatmap-server/grid-cell.png index c1fe7041..6109b1eb 100644 Binary files a/examples/cohort-heatmap-server/grid-cell.png and b/examples/cohort-heatmap-server/grid-cell.png differ diff --git a/examples/cohort-heatmap-server/screenshot.png b/examples/cohort-heatmap-server/screenshot.png index a8ad0e77..82180493 100644 Binary files a/examples/cohort-heatmap-server/screenshot.png and b/examples/cohort-heatmap-server/screenshot.png differ diff --git a/examples/customer-segmentation-server/grid-cell.png b/examples/customer-segmentation-server/grid-cell.png index c0c19bf5..c64f6a43 100644 Binary files a/examples/customer-segmentation-server/grid-cell.png and b/examples/customer-segmentation-server/grid-cell.png differ diff --git a/examples/customer-segmentation-server/screenshot.png b/examples/customer-segmentation-server/screenshot.png index d891fbc6..cd0628ce 100644 Binary files a/examples/customer-segmentation-server/screenshot.png and b/examples/customer-segmentation-server/screenshot.png differ diff --git a/examples/map-server/README.md b/examples/map-server/README.md index ad9223dc..d3862e1d 100644 --- a/examples/map-server/README.md +++ b/examples/map-server/README.md @@ -2,13 +2,14 @@ ![Screenshot](screenshot.png) -Interactive 3D globe viewer using CesiumJS with OpenStreetMap tiles. Demonstrates geocoding integration and full MCP App capabilities. +Interactive 3D globe viewer using CesiumJS with multiple tile provider options. Demonstrates geocoding integration and full MCP App capabilities. ## Features - **3D Globe Rendering**: Interactive CesiumJS globe with rotation, zoom, and 3D perspective - **Geocoding**: Search for places using OpenStreetMap Nominatim (no API key required) -- **OpenStreetMap Tiles**: Uses free OSM tile server (no Cesium Ion token needed) +- **Multiple Tile Styles**: Choose between Carto Voyager (smooth, with retina support) or classic OpenStreetMap tiles +- **Retina Support**: Automatic @2x tile loading on high-DPI displays for sharper rendering - **Dynamic Loading**: CesiumJS loaded from CDN at runtime for smaller bundle size ## Running @@ -53,11 +54,15 @@ Display the 3D globe zoomed to a bounding box. "south": 48.85, "east": 2.3, "north": 48.86, - "label": "Eiffel Tower" + "label": "Eiffel Tower", + "style": "carto" } ``` -Defaults to London if no coordinates provided. +Parameters: +- `west`, `south`, `east`, `north`: Bounding box coordinates (defaults to London) +- `label`: Optional label to display +- `style`: Tile style - `"carto"` (default, smooth with retina) or `"osm"` (classic, more detailed) ## Architecture @@ -66,18 +71,19 @@ Defaults to London if no coordinates provided. Exposes two tools: - `geocode` - Queries OpenStreetMap Nominatim API with rate limiting -- `show-map` - Renders the CesiumJS globe UI at a specified location +- `show-map` - Renders the CesiumJS globe UI at a specified location with configurable tile style -Configures Content Security Policy to allow fetching tiles from OSM and Cesium CDN. +Configures Content Security Policy to allow fetching tiles from Carto, OSM, and Cesium CDN. ### App (`src/mcp-app.ts`) Vanilla TypeScript app that: - Dynamically loads CesiumJS from CDN -- Initializes globe with OpenStreetMap imagery (no Ion token) +- Supports multiple tile providers (Carto Voyager with @2x retina, classic OSM) - Receives tool inputs via the MCP App SDK - Handles camera navigation to specified bounding boxes +- Switches tile styles at runtime based on tool input ## Key Files diff --git a/examples/map-server/grid-cell.png b/examples/map-server/grid-cell.png index a5a85b9a..484c737b 100644 Binary files a/examples/map-server/grid-cell.png and b/examples/map-server/grid-cell.png differ diff --git a/examples/map-server/mcp-app.html b/examples/map-server/mcp-app.html index e46c7ebb..8fa6556e 100644 --- a/examples/map-server/mcp-app.html +++ b/examples/map-server/mcp-app.html @@ -21,10 +21,9 @@ border-radius: .75rem; overflow: hidden; } - #fullscreen-btn { + .map-btn { position: absolute; top: 10px; - right: 10px; width: 36px; height: 36px; background: rgba(0, 0, 0, 0.7); @@ -37,14 +36,20 @@ justify-content: center; transition: background 0.2s; } - #fullscreen-btn:hover { + .map-btn:hover { background: rgba(0, 0, 0, 0.85); } - #fullscreen-btn svg { + .map-btn svg { width: 20px; height: 20px; fill: white; } + #home-btn { + left: 10px; + } + #fullscreen-btn { + right: 10px; + } #loading { position: absolute; top: 50%; @@ -61,7 +66,11 @@
- +