2017 © Pedro Peláez
 

yii2-extension yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

image

msvdev/yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

  • Thursday, April 5, 2018
  • by mihaylichenko
  • Repository
  • 3 Watchers
  • 7 Stars
  • 286 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

Map input widget for Yii2

The widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services., (*1)

Installation

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

$ php composer.phar require msvdev/yii2-widget-mappicker "*"

or add, (*3)

"msvdev/yii2-widget-mappicker": "*"

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

Usage

Minimal example for google maps

echo $form->field($model, 'coordinatesAttribute')->widget(\msvdev\widgets\mappicker\MapInput::className(), ['apiKey' => 'google_api_key']);

Minimal example for yandex maps

echo $form->field($model, 'coordinatesAttribute')->widget(\msvdev\widgets\mappicker\MapInput::className(), ['service' => 'yandex']);

Example settings

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' => '', // required google maps
        'coordinatesDelimiter' => '@', // attribute coordinate string delimiter, default "@" (lat@lng)       
        'mapWidth' => '800px', // width map container, default "500px"
        'mapHeight' => '500px', // height map container, default "500px"
        'mapZoom' => '14', // map zoom value, default "10"
        'mapCenter' => [55.753338, 37.622861], // coordinates center map with an empty attribute, default Moscow        
    ]
);

The Versions

05/04 2018

dev-master

9999999-dev https://github.com/mihaylichenko/yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

  Sources   Download

MIT BSD 3-Clause

The Requires

 

plugin extension yii2 widget map googlemap yandexmap

05/04 2018

1.0.1

1.0.1.0 https://github.com/mihaylichenko/yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

  Sources   Download

MIT

The Requires

 

plugin extension yii2 widget map googlemap yandexmap

21/02 2016

1.0.0

1.0.0.0 https://github.com/mihaylichenko/yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 widget map googlemap yandexmap