- What is otrsw/leaflet-map and what does it do?
- It is a Laravel Nova form field that wraps Leaflet (via Vue2Leaflet) into Nova's field lifecycle so admins can capture and display geographic coordinates on a resource. It is a thin UI adapter only: it ships no geocoding, tile service, storage schema, or backend logic. Treat it as a small front-end component, not a mapping capability. If your app is not running Nova, the package has no use.
- Does otrsw/leaflet-map work with Laravel Nova 4 or Nova 5?
- Probably not without modification. The last release was January 2021, which places it in the Nova 2/3 era, while Nova 4 moved to Vue 3 and changed field asset compilation and Nova 5 continued that line. A 2021 Vue 2 field is very unlikely to load correctly under current Nova. Time-box a spike on a branch and verify rendering and saving separately before committing.
- How do I install otrsw/leaflet-map?
- The nominal path is composer require otrsw/leaflet-map, then register the field class in your Nova resource and add it to the resource's fields method. That step is trivial; the real work is confirming the field does not silently break the Nova admin UI. Pin or vendor the package rather than consuming upstream directly, since there have been no releases since January 2021.
- Can I use otrsw/leaflet-map in Blade views, Filament, Inertia, or an API-only app?
- No. Despite descriptions that mention Blade rendering, the package is a Nova field and depends on Nova's field lifecycle and asset pipeline. In Filament, plain Blade, Inertia, or an API-only product it is unusable without a rewrite. Use a dedicated Leaflet integration or build a small component instead.
- How does the field persist latitude and longitude coordinates?
- The package does not define a storage convention or migration; how coordinates are saved depends on how the field is wired into your resource. It may map to separate latitude and longitude columns or a JSON blob, so inspect the field code and match it to your existing schema before adopting. Confirm this before writing migrations, since a mismatched convention is a common integration failure.
- How do I configure tile layers, center, and zoom?
- Configuration is done through the field's options for the tile URL and attribution, initial center coordinates, and zoom level, then rendered by Leaflet. Check which tile provider the field defaults to and whether that complies with the provider's usage policy and your API-key or egress model. Review the bundled Leaflet version too, since the package pins assumptions from 2021.
- Which Laravel and PHP versions does otrsw/leaflet-map support?
- The provided documentation does not state explicit constraints. Given the January 2021 release, expect it to target the Laravel 6 to 8 era with PHP 7.x, which may not intersect your current runtime. Check composer.json for laravel/framework, php, and nova constraints and compare them against your exact stack before installing.
- Is otrsw/leaflet-map safe to use in production?
- Risk is high. The package has roughly 8 stars, zero dependents, a score of 0.1, and no release since January 2021, so there is no downstream validation and no one surfacing breakage. The bundled JavaScript is a supply-chain surface that has not been updated or audited in years. The realistic profile is an abandoned micro-package: small enough to fork, but not safe to consume as-is.
- What are the alternatives to otrsw/leaflet-map for maps in Laravel Nova?
- Options are a maintained Nova-native map field, a simpler read-only static map or link if you only need display, or building the field in-house against Leaflet. Building it yourself is likely comparable effort to modernizing this package and gives cleaner long-term ownership. This package is best treated as a reference implementation, not a dependency.
- How should I test the map field before shipping it?
- Sequence it as a time-boxed spike: confirm your Nova version and coordinate storage convention, install in a branch, and load the field on a single resource. Treat renders and saves as two separate tests, and validate against your exact Nova, Laravel, PHP, and Node/Vite versions. Front-end asset compilation is the most likely failure point, so also check the field in your target Nova theme and form layout.