PHPackages                             buihoangvu/yii2-mapinputwidget - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. buihoangvu/yii2-mapinputwidget

ActivePackage[Utility &amp; Helpers](/categories/utility)

buihoangvu/yii2-mapinputwidget
==============================

Yii2 widget to select location at map and choose map coordinates

017JavaScript

Since Mar 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/buihoangvu/yii2-MapInputWidget)[ Packagist](https://packagist.org/packages/buihoangvu/yii2-mapinputwidget)[ RSS](/packages/buihoangvu-yii2-mapinputwidget/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)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();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d024af79a7b0b6a610c22f4ef7020445ed4abe92cee3365ae8df8583dd6f5bc0?d=identicon)[buihoangvu](/maintainers/buihoangvu)

---

Top Contributors

[![buihoangvu](https://avatars.githubusercontent.com/u/4515621?v=4)](https://github.com/buihoangvu "buihoangvu (7 commits)")

### Embed Badge

![Health badge](/badges/buihoangvu-yii2-mapinputwidget/health.svg)

```
[![Health](https://phpackages.com/badges/buihoangvu-yii2-mapinputwidget/health.svg)](https://phpackages.com/packages/buihoangvu-yii2-mapinputwidget)
```

PHPackages © 2026

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