1. Go to this page and download the library: Download quexer69/yii2-google-api 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/ */
quexer69 / yii2-google-api example snippets
'components' => [
// Google Maps Image and Geocode API settings for \Yii::$app->googleApi component
'googleApi' => [
'class' => 'quexer\googleapi\GoogleApiLibrary',
// API Keys !!!
'staticmap_api_key' => '***************************************',
'geocode_api_key' => '***************************************',
// Set basePath
'webroot' => '@webroot',
// Image path and map iframe settings
'map_image_path' => '/images/google_map',
'map_type' => 'terrain',
'map_size' => '520x350',
'map_sensor' => false,
'map_zoom' => 9,
'map_scale' => 1,
'map_marker_color' => 'red',
'map_iframe_width' => '100%', // %, px, em
'map_iframe_height' => '500px', // %, px, em
'map_language' => 'de',
// Debug
'quiet' => false
],
...
],