PHP code example of msvdev / yii2-widget-mappicker
1. Go to this page and download the library: Download msvdev/yii2-widget-mappicker 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/ */
use \msvdev\widgets\mappicker\MapInput;
echo $form->field($model, 'coordinatesAttribute')->widget(
MapInput::className(),
[
'language' => 'en-Us', // map language, default is the same as in the app
'service' => 'google', // map service provider, "google" or "yandex", default "google"
'apiKey' => '', // // coordinates center map with an empty attribute, default Moscow
]
);
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.