Download the PHP package lbcdev/livewire-maps-core without Composer
On this page you can find all versions of the php package lbcdev/livewire-maps-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package livewire-maps-core
Livewire Maps Core
A Livewire component for interactive maps with Leaflet.js integration. Core package for the LBCDev Maps Suite.
Features
- πΊοΈ Interactive Maps: Full Leaflet.js integration via Alpine.js
- π― Single & Multi Marker: Support for single markers or marker collections
- π Reactive Updates: Real-time map updates with Livewire
- π Coordinate Validation: Built-in validation for latitude/longitude
- β‘ Events System: Emit and listen to map events
- π¨ Customizable: Extensive configuration options
- β Well Tested: 13 comprehensive tests
- π Fully Documented: Complete API documentation
Requirements
- PHP 8.1 or higher
- Laravel 10.x or 11.x
- Livewire 3.x
- lbcdev/map-geometries
Installation
Publish the configuration file:
Quick Start
Basic Usage
With Single Marker
With Multiple Markers
Configuration
The package comes with sensible defaults, but you can customize everything:
Component API
Properties
| Property | Type | Default | Description |
|---|---|---|---|
$marker |
Marker\|null |
null |
Single marker to display |
$markers |
MarkerCollection\|null |
null |
Collection of markers |
$center |
array |
config | Map center ['lat' => X, 'lng' => Y] |
$zoom |
int |
config | Initial zoom level |
$height |
string |
'500px' |
Map container height |
$interactive |
bool |
true |
Enable/disable interactions |
$options |
array |
config | Leaflet map options |
Methods
| Method | Parameters | Description |
|---|---|---|
addMarker() |
Marker $marker |
Add a marker to the map |
removeMarker() |
string $id |
Remove a marker by ID |
clearMarkers() |
- | Remove all markers |
flyTo() |
float $lat, float $lng, int $zoom |
Center map with animation |
Computed Properties
| Property | Type | Description |
|---|---|---|
markersData |
array |
Get all markers as array |
hasCoordinates |
bool |
Check if valid coordinates |
Events
Emitted Events
Listening to Events
Advanced Usage
Custom Map Options
Read-Only Mode
Custom Height
Legacy Mode (Separate lat/lng)
For backward compatibility:
Using in Livewire Components
Testing
With coverage:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Luinux81
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Related Packages
This package is part of the LBCDev Maps Suite:
- map-geometries - Map geometry classes (Marker, Polyline, etc.)
- filament-maps-fields - Map form fields for Filament
- filament-maps-widgets - Map widgets for Filament panels
- lbcdev-filament-maps-suite - Meta-package for all components
All versions of livewire-maps-core with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
livewire/livewire Version ^3.0
lbcdev/map-geometries Version ^1.0