PHP code example of whitecube / nova-google-maps

1. Go to this page and download the library: Download whitecube/nova-google-maps 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/ */

    

whitecube / nova-google-maps example snippets

 php
use Whitecube\NovaGoogleMaps\GoogleMaps;

/**
 * Get the fields displayed by the resource.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return array
 */
public function fields(Request $request)
{
    return [
        // ...

        GoogleMaps::make('Map')
            ->zoom(8) // Optionally set the zoom level
            ->defaultCoordinates($lat, $lng) // Optionally set the map's default center point
    ];
}