Download the PHP package afsakar/filament-leaflet-map-picker without Composer

On this page you can find all versions of the php package afsakar/filament-leaflet-map-picker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-leaflet-map-picker

FilamentPHP LeafletJS Map Picker

A Filament Forms component that provides an interactive Leaflet map for selecting and storing geographical coordinates.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Banner

Features

Screenshot

Compatibility

Package line Filament Laravel PHP Notes
v3.0.0 target 4.x 12.x 8.2+ Supported in this line
v3.0.0 target 4.x 13.x 8.3+ Supported in this line
v3.0.0 target 5.x 12.x 8.2+ Host app must provide Livewire 4 and Tailwind CSS 4
v3.0.0 target 5.x 13.x 8.3+ Host app must provide Livewire 4 and Tailwind CSS 4
v2.x 3.x Existing v2 support matrix See v2 docs Filament 3 stays on the v2 line

Filament 3 support is intentionally not part of the v3.0.0 package line. If you are staying on Filament 3, keep using the v2 releases.

Installation

Install the PHP package in your Filament app:

The package auto-discovers its service provider. Filament assets are registered with FilamentAsset and loaded on demand through the component views' x-load, x-load-src, and x-load-css attributes, so you do not need to copy the compiled JS/CSS into your app for normal usage.

If you want Leaflet's image assets published locally, you can still publish them:

You can publish translations with:

Optionally, you can publish the views with:

Database and model setup

Store the coordinates in a json or text column:

Cast the attribute to array in your model:

Canonical state format and migration notes

The canonical saved state for v3 is:

The package still reads these legacy inputs while you migrate existing data:

New writes should use the canonical object shape. If you already cast the column to array, Laravel will persist the object-shaped array cleanly in a json column.

Usage

Form

To show editable latitude and longitude inputs inside the picker, enable them on the picker and do not add separate sibling inputs for the same location state path:

When enabled, the selected-location summary is hidden. The default is false, which keeps the summary visible.

The simplest canonical default location example is:

State synchronization behavior

Table column

The column renders a compact thumbnail: it marks the location with a small dot instead of a pin and hides the attribution control, which would otherwise cover most of the tile. The default height is 50px.

The column is read-only. It accepts the canonical { lat, lng } object and legacy arrays or JSON strings. Null and invalid values use the configured default only for visual map placement; they are not shown as a selected record location and never change the row state.

Infolist

Search, tile, and geolocation policy

Development checks

Run the package checks from the repository root:

Screenshots

Default: Screenshot

Custom Marker: Screenshot

Custom Tile: Screenshot

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-leaflet-map-picker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/forms Version ^4.0|^5.0
filament/infolists Version ^4.0|^5.0
filament/tables Version ^4.0|^5.0
filament/support Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package afsakar/filament-leaflet-map-picker contains the following files

Loading the files please wait ...