Skip to content

Commit ec41b80

Browse files
committed
refactor: integrate maplibre-preview gem for map preview system
- removed local map files: map.slim, map_layout.slim, filters.js - added maplibre-preview gem to Gemfile - updated config.ru to use render_maplibre_preview - removed outdated map_preview_system.md documentation - updated README.md documentation with gem information - simplified project structure by extracting map to separate gem - maintained full compatibility with existing URL parameters
1 parent a0926f4 commit ec41b80

File tree

11 files changed

+16
-3042
lines changed

11 files changed

+16
-3042
lines changed

readme.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A specialized service for combining and mixing Mapbox styles with support for sp
1313
- **Sprite Merging**: Automatic merging of sprite images and metadata using ImageMagick with fallback generation for high-DPI sprites
1414
- **Font Management**: Download and cache font files with range support (0-255, 256-511, etc.)
1515
- **Advanced Filtering**: Two-level filtering system with Mapbox expressions and real-time layer control
16-
- **Interactive Preview**: Web-based map interface with dual-mode controls (filters/layers), performance monitoring, and source style navigation
16+
- **Interactive Preview**: Web-based map interface powered by maplibre-preview gem with advanced filtering, performance monitoring, and source style navigation
1717
- **REST API**: Complete API for style serving with authentication support
1818
- **Docker Ready**: Containerized deployment with volume mounting for configuration
1919

@@ -24,7 +24,7 @@ The service consists of several key components:
2424
- **[Style Mixer](src/docs/en/style_mixer.md)** - Combines multiple Mapbox styles with prefix management
2525
- **[Style Downloader](src/docs/en/style_downloader.md)** - Downloads source styles and resources with authentication support
2626
- **[Sprite Merger](src/docs/en/sprite_merger.md)** - Merges sprite assets using ImageMagick
27-
- **[Map Preview System](src/docs/en/map_preview_system.md)** - Advanced filtering and layer management
27+
- **[MapLibre Preview Gem](https://github.com/artyomb/maplibre-preview)** - Advanced map preview interface with filtering and layer management
2828

2929
## Quick Start
3030

@@ -103,7 +103,7 @@ styles:
103103
| `/styles` | GET | List all available styles | JSON |
104104
| `/styles/:id` | GET | Get mixed style JSON | JSON |
105105
| `/refresh` | GET | Reload and remix all styles | Redirect |
106-
| `/map` | GET | Interactive map preview interface | HTML |
106+
| `/map` | GET | Interactive map preview interface (powered by maplibre-preview gem) | HTML |
107107

108108
### Resource Endpoints
109109

@@ -150,12 +150,9 @@ src/
150150
│ └── styles_config.yaml # Configuration file
151151
├── views/ # Web interface templates
152152
│ ├── index.slim # Main page
153-
│ ├── map.slim # Map preview interface
154-
│ ├── map_layout.slim # Map layout template
155153
│ └── layout.slim # Layout template
156154
├── public/ # Static assets
157-
│ └── js/ # JavaScript files
158-
│ └── filters.js # Filter system implementation
155+
│ └── icons/ # Favicon and icons
159156
├── spec/ # Test suite
160157
├── mixed_styles/ # Generated mixed styles
161158
├── sprite/ # Merged sprite files
@@ -174,6 +171,7 @@ src/
174171
- Ruby 3.4+
175172
- Bundler
176173
- Docker (optional)
174+
- maplibre-preview gem (automatically installed)
177175
178176
### Setup
179177

src/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0
1+
1.1

src/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ gem 'parallel'
1818
gem 'slim'
1919
gem 'sassc'
2020
gem 'build-labels'
21+
gem 'maplibre-preview'
2122

2223
group :test do
2324
gem 'rspec'

0 commit comments

Comments
 (0)