PHPackages                             kalyabin/yii2-select-google-map-location - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. kalyabin/yii2-select-google-map-location

ActivePackage[Framework](/categories/framework)

kalyabin/yii2-select-google-map-location
========================================

Yii2 widget to select location at map and choose map coordinates

1.1.4(7y ago)2821.0k—0%13[6 issues](https://github.com/kalyabin/yii2-select-google-map-location/issues)BSD-3-ClauseJavaScriptPHP &gt;=5.4.0

Since Oct 14Pushed 4y ago2 watchersCompare

[ Source](https://github.com/kalyabin/yii2-select-google-map-location)[ Packagist](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)[ RSS](/packages/kalyabin-yii2-select-google-map-location/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

yii2-select-map-location
========================

[](#yii2-select-map-location)

Yii2 widget to select location at map and choose map coordinates

This extension adds functionality to select the location on the Google map. The extension indicates the model and attributes, which stores the address, latitude and longitude.

When choosing a location map of switches and sets the marker to the selected location. The attributes recorded address and coordinates of the selected location.

[![Latest Stable Version](https://camo.githubusercontent.com/d33873cac2d22f08fc486007e2001de4976c0ff3d1be98f5695bf1b8ee9ef54d/68747470733a2f2f706f7365722e707567782e6f72672f6b616c796162696e2f796969322d73656c6563742d676f6f676c652d6d61702d6c6f636174696f6e2f762f737461626c65)](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)[![Total Downloads](https://camo.githubusercontent.com/0cfd91e469b55d1e35795a26c1da72d7753937631e6b90236b1eefa3081f0a4a/68747470733a2f2f706f7365722e707567782e6f72672f6b616c796162696e2f796969322d73656c6563742d676f6f676c652d6d61702d6c6f636174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)[![Monthly Downloads](https://camo.githubusercontent.com/62a9c019129ffbaad79113ac6fadd898e4dc69380793c8545d2f4bdbf5474d15/68747470733a2f2f706f7365722e707567782e6f72672f6b616c796162696e2f796969322d73656c6563742d676f6f676c652d6d61702d6c6f636174696f6e2f642f6d6f6e74686c79)](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)[![Latest Unstable Version](https://camo.githubusercontent.com/d5ce6d44ae631024a5678f96fec4c5c49e95ed0171e71a82afb914b4f35bff22/68747470733a2f2f706f7365722e707567782e6f72672f6b616c796162696e2f796969322d73656c6563742d676f6f676c652d6d61702d6c6f636174696f6e2f762f756e737461626c65)](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)[![License](https://camo.githubusercontent.com/407e3794f11fc549ee7bb894b5eb7c0b585f075191d6606fe235a7476bf63a4c/68747470733a2f2f706f7365722e707567782e6f72672f6b616c796162696e2f796969322d73656c6563742d676f6f676c652d6d61702d6c6f636174696f6e2f6c6963656e7365)](https://packagist.org/packages/kalyabin/yii2-select-google-map-location)

Install
-------

[](#install)

Run at your console:

```
php composer.phar require "kalyabin/yii2-select-google-map-location" "*"
```

Register Google API
-------------------

[](#register-google-api)

First, register your Google API key as described: [Google API Documentation](https://developers.google.com/maps/documentation/javascript/get-api-key)

After this, enable at [Google console](https://console.developers.google.com/):

- Google Map JavaScript API (remember API key)
- Google Places API Web Service

Usage
-----

[](#usage)

Declare model class which will save geographic coordinates:

```
class SearchLocation extends \yii\base\Model
{
    ...
    public $address;
    public $longitude;
    public $latitude;
    ...
}
```

Render widget:

```
$model = new SearchLocation();
$form = \yii\widgets\ActiveForm::begin();
...
$form->field($model, 'address')->widget(\kalyabin\maplocation\SelectMapLocationWidget::className(), [
    'attributeLatitude' => 'latitude',
    'attributeLongitude' => 'longitude',
    'googleMapApiKey' => '',
]);
...
\yii\widgets\ActiveForm::end();
```

To use movable marker on the map describe draggable option:

```
$model = new SearchLocation();
$form = \yii\widgets\ActiveForm::begin();
...
$form->field($model, 'address')->widget(\kalyabin\maplocation\SelectMapLocationWidget::className(), [
    'attributeLatitude' => 'latitude',
    'attributeLongitude' => 'longitude',
    'googleMapApiKey' => '',
    'draggable' => true,
]);
...
\yii\widgets\ActiveForm::end();
```

To use custom field template use placeholder {map} for ActiveField:

```
$model = new SearchLocation();
$form = \yii\widgets\ActiveForm::begin();
...
$form->field($model, 'address', [
    'template' => '{label}{input}{map}{error}',
])->widget(\kalyabin\maplocation\SelectMapLocationWidget::className(), [
    'attributeLatitude' => 'latitude',
    'attributeLongitude' => 'longitude',
    'googleMapApiKey' => '',
]);
...
\yii\widgets\ActiveForm::end();
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 89.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~124 days

Recently: every ~19 days

Total

6

Last Release

2883d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07607e080febd2bb2830e3b315944ce21b774bcabe00a8a7f5bec5921c2b6561?d=identicon)[mkalyabin](/maintainers/mkalyabin)

---

Top Contributors

[![kalyabin](https://avatars.githubusercontent.com/u/5373014?v=4)](https://github.com/kalyabin "kalyabin (33 commits)")[![elfarqy](https://avatars.githubusercontent.com/u/5682478?v=4)](https://github.com/elfarqy "elfarqy (2 commits)")[![msvit1989](https://avatars.githubusercontent.com/u/22194397?v=4)](https://github.com/msvit1989 "msvit1989 (2 commits)")

---

Tags

frameworkmapyii2locationwidgetsinput widget

### Embed Badge

![Health badge](/badges/kalyabin-yii2-select-google-map-location/health.svg)

```
[![Health](https://phpackages.com/badges/kalyabin-yii2-select-google-map-location/health.svg)](https://phpackages.com/packages/kalyabin-yii2-select-google-map-location)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
