Download the PHP package aabosham/filament-google-maps-marker without Composer

On this page you can find all versions of the php package aabosham/filament-google-maps-marker. 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-google-maps-marker

Filament Google Maps Marker

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

A Filament Field to get coordinates based on Google Maps.

Fork of Filament Google Maps Picker

Installation

You can install the package via composer:

You must define an environment variable GOOGLE_MAPS_API_KEY in your .env file with your Google Maps API Key

You can publish the config file with:

This is the contents of the published config file:

Optionally, you can publish the views using

Usage

On your filament resource file

On your filament form schema

This will display a simple Google Maps field with a marker in latitude 0 and longitude 0. When you click on the map, the field value and the marker positions uptades to the new coordinates.

Example 1

Enabling Google Maps controls

Use this methods to enable Google Maps controls:

zoomControl(bool) (default: false) displays de zoom controls allow the user to change it

mapTypeControl(bool) (default: false) displays the map type selection control

scaleControl(bool) (default: false) displays the map scale control

streetViewControl(bool) (default: false) displays the map StreetView control

fullScreenControl(bool) (default: false) displays the full screen control

rotateControl(bool) (default: false) displays the rotation control

searchBoxControl(bool) (default: false) displays search box control to search for locations. Will update the field value upon selection

geolocationControl(bool) (default: false) custom control to get the device geolocation and update the map position with it. It required the user to allow the device permission to access geolocation data

coordsBoxControl(bool) (default: false) custom control that shows a text input with current value of the field in the format latitude,longitude

Options

zoom(int) (default: 1) takes an integer as value and sets the initial zoom of the map

minHeight(string) (default: 50vh) accepts a string to set the map height, must be a valid CSS min-height. Ex: 80vh, 30%, 50px

mapTypeId(string) (default: roadmap) accepts a string: roadmap,satellite,hybrid, terrain

searchBoxPlaceholderText(string) (default: Search Address) accepts a string to customize de search box placeholder text

locationButtonText(string) (default: My location) accepts a string to customize de location button text

fixMarkerOnCenter(bool) (default: false) when the user drags the map the marker pans to the center and updates the field value

default(array) (default: ['lat' => 0,'lng' => 0]) sets the default value

defaultToMyLocation(bool) (default: false) sets the default value to the current location

On your filament form schema

This will display a map with all the available options

Example 2

Testing

Changelog

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

Credits

License

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


All versions of filament-google-maps-marker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2
blade-ui-kit/blade-heroicons Version ^2.1
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.9.2
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 aabosham/filament-google-maps-marker contains the following files

Loading the files please wait ....