Download the PHP package lbcdev/map-geometries without Composer
On this page you can find all versions of the php package lbcdev/map-geometries. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package map-geometries
Map Geometries
A PHP package for working with map geometries (Markers, Polylines, Polygons, etc.) with full Livewire support.
Features
- 🎯 Marker Support: Create and manage map markers
- 🔄 Livewire Integration: Full Wireable support for real-time updates
- 📦 Collections: Powerful MarkerCollection with Iterator, Countable, ArrayAccess
- 🎨 Fluent API: Chainable methods for clean, readable code
- ✅ Well Tested: Comprehensive test suite with 36+ tests
- 📚 Fully Documented: Complete PHPDoc and usage examples
Requirements
- PHP 8.1 or higher
- Composer
Installation
Quick Start
Creating a Marker
Using MarkerCollection
API Documentation
Marker
Creation
Methods
| Method | Description | Return |
|---|---|---|
label(?string $label) |
Set the marker label | self |
tooltip(?string $tooltip) |
Set the tooltip (supports HTML) | self |
icon(?string $icon) |
Set custom icon | self |
iconColor(?string $color) |
Set icon color | self |
options(array $options) |
Set custom options | self |
metadata(array $metadata) |
Set metadata | self |
getLatitude() |
Get latitude | float |
getLongitude() |
Get longitude | float |
getCoordinates() |
Get [lat, lng] | array |
toArray() |
Convert to array | array |
toJson() |
Convert to JSON | string |
MarkerCollection
Methods of MarkerCollection
| Method | Description | Return |
|---|---|---|
add(Marker $marker) |
Add marker to collection | self |
get(int $index) |
Get marker by index | Marker\|null |
remove(int $index) |
Remove marker by index | self |
clear() |
Remove all markers | self |
all() |
Get all markers | array |
isEmpty() |
Check if empty | bool |
count() |
Count markers | int |
toArray() |
Convert to array | array |
toJson() |
Convert to JSON | string |
Livewire Integration
Markers are fully compatible with Livewire:
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:
- livewire-maps-core - Core Livewire map component
- filament-maps-fields - Map form fields for Filament
- filament-maps-widgets - Map widgets for Filament panels
All versions of map-geometries with dependencies
PHP Build Version
Package Version
The package lbcdev/map-geometries contains the following files
Loading the files please wait ...