1. Go to this page and download the library: Download meysampg/yii2-gmapmarker 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/ */
meysampg / yii2-gmapmarker example snippets
return [
// Some codes are here :)
'components' => [
// And also maybe here ;)
'assetManager' => [
'bundles' => [
'meysampg\gmap\GMapAsset' => [
'key' => 'YOU_API_KEY',
'language' => 'en'
],
],
],
],
];
<?= GMapMarker::widget([
'width' => '98', // Using pure number for 98% of width.
'height' => '400px', // Or use number with unit (In this case 400px for height).
'marks' => [35.6892, 51.3890],
'zoom' => 5,
'disableDefaultUI' => true
]);