PHP code example of trinityrank / google-map-with-autocomplete

1. Go to this page and download the library: Download trinityrank/google-map-with-autocomplete library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

trinityrank / google-map-with-autocomplete example snippets


use Trinityrank\GoogleMapWithAutocomplete\TRMap;
use Trinityrank\GoogleMapWithAutocomplete\TRCountry;
use Trinityrank\GoogleMapWithAutocomplete\TRState;
use Trinityrank\GoogleMapWithAutocomplete\TRCity;
use Trinityrank\GoogleMapWithAutocomplete\TRZipCode;
use Trinityrank\GoogleMapWithAutocomplete\TRAddress;

TRMap::make('Map'), // Google Map with address picker
TRCountry::make('Country'), // Country field
TRState::make('State'), // State field
TRCity::make('City'), // City field
TRZipCode::make('Zip Code'), // Zip Code Filed
TRAddress::make('Address'), // Autocomplete address field

use Trinityrank\GoogleMapWithAutocomplete\TRLocation;

TRLocation::make('Location'), // All fileds in panel with 

TRMap::make('Map')
    ->latitude('latitude')
    ->longitude('longitude')
    ->zoom('zoom'),

TRMap::make('Map')
    ->hideLatitude()
    ->hideLongitude(),
shell
php artisan vendor:publish --provider="Trinityrank\GoogleMapWithAutocomplete\FieldServiceProvider"