yii2-extension 2gis-yii2-input
Yii2 2gis map input widget. Allows you to select geographcal coordinates via a human-friendly inteface.
rocknroi/2gis-yii2-input
Yii2 2gis map input widget. Allows you to select geographcal coordinates via a human-friendly inteface.
- Monday, July 31, 2017
- by Henakel
- Repository
- 0 Watchers
- 0 Stars
- 8 Installations
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Description!
2gis map for YII2, replace input on map, (*1)
Install
php composer.phar require rocknroi/2gis-yii2-input
Minimal example
echo $form->field($model, 'coordinates')->widget('rocknroi\yii2\map2gis\widgets\MapInputWidget');
Extended example
echo $form->field($model, 'coordinates')->widget(
'rocknroi\yii2\widgets\MapInputWidget',
[
// Initial map center latitude. Used only when the input has no value.
// Otherwise the input value latitude will be used as map center.
// Defaults to 0.
'latitude' => 42,
// Initial map center longitude. Used only when the input has no value.
// Otherwise the input value longitude will be used as map center.
// Defaults to 0.
'longitude' => 42,
// Initial map zoom.
// Defaults to 0.
'zoom' => 12,
// Map container width.
// Defaults to '100%'.
'width' => '420px',
// Map container height.
// Defaults to '300px'.
'height' => '420px',
]
);