Download the PHP package darkclow4/filament-map-picker without Composer

On this page you can find all versions of the php package darkclow4/filament-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-map-picker

Filament Map Picker

filament-map-picker is a custom field for Filament 5 that provides an interactive Leaflet.js map for selecting a point location and, optionally, drawing one or more map areas as GeoJSON.

The package is designed to stay flexible. It does not force how you persist latitude, longitude, or area data. Instead, it keeps a predictable field state and lets you map the values however you want through afterStateUpdated() and afterStateHydrated().

Features

Requirements

Installation

Install the package with Composer:

Then publish Filament assets:

Package Registration

The package supports Laravel auto-discovery through:

In most applications, no manual provider registration is needed.

State Format

Point-only mode

By default, the field stores point coordinates as:

Point + draw mode

When draw mode is enabled, the field stores a combined state:

This makes it easy to keep a marker location and one or more service-area shapes in the same field while still saving them into separate database columns.

Basic Usage

Point-only field

Point + area in a single field

Selection Modes

Drag mode

Click mode

Default Tile Layer

If you do not provide custom tiles, the field uses OpenStreetMap automatically.

Built-in default tile definition:

Custom Tile Layers

You can provide your own tile layers with ->tiles([...]). Those definitions are serialized to JSON and passed directly to Leaflet.

Tile behavior:

Searchable Mode

Enable geocoding search when you want users to jump quickly to a location:

Behavior:

By default, search uses:

You can override it:

Drawing Shapes as GeoJSON

Enable draw mode when you want the user to define areas while keeping a marker location in the same field state.

Notes:

API Reference

->tile(string $tile)

Sets the active tile key.

->tiles(array $tiles)

Registers custom tile layers.

Expected tile format:

->showDefaultTile(bool $condition = true)

Controls whether the built-in osm tile should be included in the available tile list.

->mode('drag|click')

Defines the point marker interaction mode.

->defaultLocation(float $lat, float $lng)

Sets the initial map coordinates.

->zoom(int $level)

Sets the initial map zoom level.

->height(int|string $height)

Sets the map container height.

->markerColor(string $color)

Sets the marker color used in both drag and click modes.

->searchable(bool $condition = true)

Enables place search.

->searchPlaceholder(string $placeholder)

Overrides the search input placeholder.

->searchProviderUrl(string $url)

Overrides the geocoding endpoint used by the search box.

->searchResultLimit(int $limit)

Controls how many search results are shown in the dropdown.

->drawable(bool $condition = true)

Enables shape drawing tools and switches the field state into combined point + GeoJSON mode.

->drawTools(array $tools)

Controls which draw tools are available. Supported values are polygon, rectangle, and circle.

->fitDrawBounds(bool $condition = true)

Controls whether the map should automatically fit to the drawn shapes after create or edit.

->multipleShapes(bool $condition = true)

Allows the field to keep multiple drawn shapes inside the GeoJSON FeatureCollection.

->showAreaMeasurement(bool $condition = true)

Shows area labels directly inside the map for each drawn shape when draw mode is enabled.

->areaMeasurementUnit('m2'|'ha')

Controls the unit used for the displayed area measurement.

Notes

License

This package is open-sourced software licensed under the MIT license.


All versions of filament-map-picker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^5.0
illuminate/contracts Version ^13.0
spatie/laravel-package-tools Version ^1.92
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 darkclow4/filament-map-picker contains the following files

Loading the files please wait ...