Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ux Map Laravel Package

symfony/ux-map

Symfony UX Map integrates interactive maps like Leaflet and Google Maps into Symfony apps, letting you render and configure maps with PHP and Twig.

View on GitHub
Deep Wiki
Context7

Easily embed interactive maps in your Symfony application

Frequently asked questions about Ux Map
Can I use symfony/ux-map in a Laravel application?
It is not a native Laravel package, but Laravel projects can evaluate it through the Symfony Bridge with symfony/ux-map v2.35.0 and Symfony 7.4 or later. Full functionality requires adopting Symfony UX 3.x conventions such as Stimulus controllers and Live Components. For a pure Laravel stack, integrating Leaflet directly may be simpler.
How do I install symfony/ux-map for a Laravel project?
Install it via Composer alongside the Symfony Bridge, then wire the Stimulus controllers and Twig helpers into your frontend build. The package expects Symfony UX 3.x conventions and Twig rendering through ux_map() or the twig:ux:map component. Laravel Blade does not provide these helpers natively, so you need an adapter layer or a Symfony-rendered view. Test the integration in a small spike before committing.
Which Laravel versions are supported by symfony/ux-map?
The package is not versioned for Laravel; compatibility depends on the Symfony Bridge and Symfony UX 3.x, which target Symfony 7.4 and later. Laravel projects must verify their PHP and frontend build versions against those requirements. There is no official Laravel support matrix, so pin versions and run integration tests.
Does symfony/ux-map require Symfony UX 3.x?
Yes, full compatibility with newer symfony/ux-map releases assumes Symfony UX 3.x, including updated Stimulus controllers and Live Component syntax. Projects still on UX 2.x need a migration plan before using the newer features. The deprecated render_map() Twig function is replaced by ux_map().
How do I render a map in Twig from Laravel?
The package provides ux_map() and the twig:ux:map component for Twig, which Laravel does not render natively. You would need to expose an equivalent server-driven configuration through the Symfony Bridge or generate the map config in PHP and pass it to JavaScript. Blade users typically need a custom adapter or a separate Symfony view layer. This is a key integration cost to evaluate.
Can symfony/ux-map work with Google Maps instead of Leaflet?
Leaflet.js is the built-in lightweight option, and Google Maps is supported through custom renderers. You can also use external tile providers such as OpenStreetMap or Mapbox. Advanced Google Maps API features or 3D maps may require custom JavaScript beyond the package defaults.
Do I need PostGIS to use symfony/ux-map in Laravel?
No, the package is backend-agnostic for geospatial data and only renders maps. Laravel projects can use PostgreSQL/PostGIS or spatie/laravel-postgis for spatial queries, but without PostGIS you must handle geocoding client-side or through third-party APIs. Plan your spatial data layer separately from the map rendering.
Is symfony/ux-map production-ready for Laravel apps?
It is production-ready within Symfony UX 3.x, but Laravel usage through the Symfony Bridge is an integration path rather than an officially supported Laravel package. Risks include UX 3.x breaking changes, the Stimulus and Live Component learning curve, and debugging reactive frontend interactions. Run a proof of concept and cover map configuration with tests before production.
What are alternatives to symfony/ux-map for Laravel?
For pure Laravel, direct Leaflet.js integration, Livewire map components, or packages built around Leaflet or Google Maps may be lower-friction. You can also use a standalone Leaflet.js approach, though you lose Symfony UX server-driven reactivity. Choose based on whether you need PHP and Twig map configuration or a simpler JavaScript-first setup.
How do I test symfony/ux-map integration in a Laravel application?
Test the PHP-side map configuration separately from the JavaScript rendering, asserting markers, polygons, and center or zoom values. Use browser tests to confirm the Stimulus controller boots and the map container renders. Include a smoke test for tile provider access and version-pinned Symfony Bridge compatibility.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource