geoproject-app/public/site/blueprints/pages/map.yml
isUnknown 9193ac8900 feat: implement automatic static map image generation
- Add html-to-image for capturing map container with markers
- Auto-generate map image on page/marker save via hooks
- Use flag system (.regenerate-map-image) to trigger generation on Panel reload
- Create file using Kirby API for proper indexing
- Add mapStaticImage field in blueprint to display generated image
- Wait for map to be fully loaded before capture
- Capture entire container (map + custom markers)
- Filter MapLibre controls from capture

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-06 11:48:20 +01:00

35 lines
883 B
YAML

title: Carte
columns:
main:
width: 2/3
sections:
fields:
type: fields
fields:
tags:
label: Mots-clés
type: tags
text:
label: Présentation de la carte
type: writer
mapdata:
label: Carte
type: map-editor
defaultCenter: [43.836699, 4.360054]
defaultZoom: 13
maxMarkers: 50
mapStaticImage:
label: Image statique générée
type: files
multiple: false
query: page.files.filterBy("name", "map-static")
layout: cards
disabled: true
help: Cette image est automatiquement générée à la sauvegarde de la page ou d'un marqueur
sidebar:
width: 1/3
sections:
files:
label: Fichiers
type: files