2017 © Pedro Peláez
 

yii2-extension yii2-location-picker

yii2 location picker

image

pavle/yii2-location-picker

yii2 location picker

  • Wednesday, October 19, 2016
  • by Pavle Lee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 109 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

yii2 location picker

yii2 location picker, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist pavle/yii2-location-picker "*"

or add, (*4)

"pavle/yii2-location-picker": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

Location: <input type="text" id="us2-address" style="width: 200px"/>
Radius: <input type="text" id="us2-radius"/>
Lat.: <input type="text" id="us2-lat"/>
Long.: <input type="text" id="us2-lon"/>
<?= $form->field($model, 'coordinates')->widget(LocationPicker::className(), [
    'id' => 'input-coordinates',
    'pattern' => '%longitude%,%latitude%',
    'pluginOptions' => [
        'location' => [
            'latitude' => $model->getLatitude(),
            'longitude' => $model->getLongitude(),
        ],
        'inputBinding' => [
            'latitudeInput' => new JsExpression("$('#us2-lat')"),
            'longitudeInput' => new JsExpression("$('#us2-lon')"),
            'radiusInput' => new JsExpression("$('#us2-radius')"),
            'locationNameInput' => new JsExpression("$('#us2-address')"),
        ],
        'enableAutocomplete' => true,
    ],
]) ?>

The Versions

19/10 2016

dev-master

9999999-dev

yii2 location picker

  Sources   Download

MIT

The Requires

 

by Pavle

extension yii2 location picker

19/10 2016

v1.0

1.0.0.0

yii2 location picker

  Sources   Download

MIT

The Requires

 

by Pavle

extension yii2 location picker