ux-map

Solid

Symfony UX Map for interactive maps with Leaflet or Google Maps in Symfony. Covers markers, polygons, polylines, circles, info windows, and LiveComponent integration. Use when displaying maps, placing markers, drawing shapes or routes, handling map events, building store locators, using custom tile layers, or making maps reactive with LiveComponent. Code triggers: <twig:ux:map />, Map(), Point(), Marker(), Polygon(), Polyline(), Circle(), InfoWindow(), MapOptionsInterface, ComponentWithMapTrait, fitBoundsToMarkers, ux:map:marker:before-create, ux:map:connect, SYMFONY_UX_MAP_DSN. Also trigger when the user asks "how to display a map", "how to add markers", "how to draw a polygon on a map", "how to handle map click events", "how to make a reactive map", "how to use Leaflet in Symfony", "how to use Google Maps in Symfony", "map not showing", "map has zero height". Do NOT trigger for SVG icons (use ux-icons) or general frontend interactivity (use stimulus).

Web & Frontend 187 stars 15 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
76
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# UX Map Interactive maps in Symfony with Leaflet or Google Maps. Build maps in PHP, render them in Twig, and extend them with Stimulus controllers. Supports markers, polygons, polylines, circles, info windows, and LiveComponent integration. ## Installation ```bash # Install the base package composer require symfony/ux-map # Then install ONE renderer: composer require symfony/ux-leaflet-map # Leaflet (free, open source) # OR composer require symfony/ux-google-map # Google Maps (requires API key) ``` ## Quick Reference ``` Map PHP object, holds markers/shapes/options Point latitude + longitude Marker pin on the map, optional InfoWindow Polygon closed shape (array of Points) Polyline open line (array of Points) Circle center Point + radius in meters InfoWindow popup attached to a Marker, Polygon, or Circle ux_map(map, attrs) Twig function to render a Map <twig:ux:map /> Twig component (requires ux-twig-component) ``` ## Building a Map in PHP ```php use Symfony\UX\Map\Map; use Symfony\UX\Map\Point; use Symfony\UX\Map\Marker; use Symfony\UX\Map\InfoWindow; use Symfony\UX\Map\Polygon; use Symfony\UX\Map\Polyline; use Symfony\UX\Map\Circle; $map = (new Map()) ->center(new Point(48.8566, 2.3522)) ->zoom(12) ->minZoom(3) ->maxZoom(18); // Marker with info window $map->addMarker(new Marker( position: new Point(48.8566, 2.3522), ...

Details

Author
smnandre
Repository
smnandre/symfony-ux-skills
Created
8 months ago
Last Updated
4 days ago
Language
N/A
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Solid

symfony-ux

Symfony UX frontend stack -- decision tree and orchestrator for choosing between Stimulus, Turbo, TwigComponent, LiveComponent, UX Icons, and UX Map. Use when the user is unsure which tool fits, wants to combine multiple UX packages, or asks a general frontend architecture question in Symfony. Also trigger when the user asks "which UX package should I use", "how to make this interactive", "should I use Stimulus or LiveComponent", "how to structure my Symfony frontend", "what is the difference between Turbo and LiveComponent", "should this be a Frame or a LiveComponent", "how do these UX packages work together", "what is the Symfony way to do frontend". Do NOT trigger when the user clearly names a specific tool (stimulus, turbo, twig-component, live-component, ux-icons, ux-map) -- defer to the specialized skill instead.

187 Updated 4 days ago
smnandre
Web & Frontend Solid

ux-icons

Symfony UX Icons for rendering SVG icons in Twig templates. Supports 200,000+ Iconify icons (Lucide, Heroicons, Tabler, Material Design, etc.), local SVG files, and custom icon sets with aliases. Use when displaying icons, configuring icon defaults, importing or locking on-demand icons, creating icon aliases, or styling SVG icons with CSS. Code triggers: <twig:ux:icon />, ux_icon(), UX_ICONS_DEFAULT_ICON_ATTRIBUTES, icon.yaml, icons/, iconify:, lucide:, heroicons:, tabler:, mdi:, bin/console ux:icons:lock, bin/console ux:icons:import. Also trigger when the user asks "how to add an icon", "how to use Lucide/Heroicons/Tabler icons", "how to render an SVG icon in Twig", "how to lock icons for production", "how to create icon aliases", "how to style an icon", "icon not found", "icon not rendering". Do NOT trigger for interactive maps (use ux-map) or general Twig components (use twig-component).

187 Updated 4 days ago
smnandre
Web & Frontend Listed

symfony-ux

Symfony UX frontend stack combining Stimulus, Turbo, TwigComponent and LiveComponent. Use when building modern Symfony frontends, choosing between UX tools, creating interactive components, handling real-time updates, or integrating multiple UX packages. Triggers - symfony ux, hotwire symfony, stimulus turbo, live component, twig component, frontend symfony, interactive ui, real-time symfony, which ux package, which tool should I use, how to make this interactive, SPA feel, reactive component, server-rendered component. Also trigger when the user asks a general question about frontend architecture in Symfony or wants to combine multiple UX packages together.

0 Updated 1 months ago
BKR-57