Add static map integration for timeline using maps.jetzt API#1182
Open
maltehuebner wants to merge 5 commits intomainfrom
Open
Add static map integration for timeline using maps.jetzt API#1182maltehuebner wants to merge 5 commits intomainfrom
maltehuebner wants to merge 5 commits intomainfrom
Conversation
Introduces a service to generate static map images via the maps.jetzt API, supporting both polyline maps (for tracks) and marker maps (for rides/cities). The cache stores URLs for 7 days to minimize API calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds MAPS_JETZT_API_URL to .env.dist and binds it to services via services.yaml. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides static_map_polyline() and static_map_marker() Twig functions to render static map images in templates. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates rideTrack, rideEdit, cityEdit, and cityCreated templates to use static map images from maps.jetzt API. Falls back to Leaflet.js maps if the API is unavailable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StaticMapServiceto generate static PNG map images via the maps.jetzt APIChanges
New files:
src/Criticalmass/StaticMap/StaticMapService.php- Service for API communicationsrc/Criticalmass/StaticMap/Cache/StaticMapCache.php- 7-day URL cachingsrc/Twig/Extension/StaticMapTwigExtension.php- Twig functions for templatesUpdated templates:
rideTrack.html.twig- Polyline maps for uploaded tracksrideEdit.html.twig- Marker maps for edited ridescityEdit.html.twig- Marker maps for edited citiescityCreated.html.twig- Marker maps for new citiesConfiguration:
MAPS_JETZT_API_URLenvironment variableservices.yamlTest plan
MAPS_JETZT_API_URLto invalid URL and verify Leaflet fallback works<img>tags instead of<div data-controller="map--map">🤖 Generated with Claude Code