PHPackages                             yipikai/geolocation-bundle - 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. yipikai/geolocation-bundle

ActiveSymfony-bundle

yipikai/geolocation-bundle
==========================

This bundle retrieve latitude and longitude with a postal address since the api adress.gouv.fr

v1.0.1(1y ago)01.9kMITPHPPHP ^7.4 || ^8.0 || ^8.1 || ^8.2

Since Jun 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/yipikai-studio/geolocation-bundle)[ Packagist](https://packagist.org/packages/yipikai/geolocation-bundle)[ RSS](/packages/yipikai-geolocation-bundle/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Geolocation Bundle
==================

[](#geolocation-bundle)

[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/5e60a0c9536ddced92150f2c5a83fa84f0f59d29a59360c731afedb79d3a4b72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796970696b61692f67656f6c6f636174696f6e2d62756e646c652e737667)](https://packagist.org/packages/yipikai/geolocation-bundle)[![Total Downloads](https://camo.githubusercontent.com/8f2b4484592419f16fc01f2c460812b539e4fac389e624523969be2b1d4502c9/68747470733a2f2f706f7365722e707567782e6f72672f796970696b61692f67656f6c6f636174696f6e2d62756e646c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/yipikai/geolocation-bundle)[![License](https://camo.githubusercontent.com/16d83dd2e38c3f0054d86845e0098ddba71e296783b538ea4ed13626a4dcb8fb/68747470733a2f2f706f7365722e707567782e6f72672f796970696b61692f67656f6c6f636174696f6e2d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/yipikai/geolocation-bundle)

Install bundle
--------------

[](#install-bundle)

You can install it with Composer:

```
composer require yipikai/geolocation-bundle

```

This bundle use the api to the [adresse.data.gouv.fr](https://adresse.data.gouv.fr/api-doc/adresse)

Documentation
-------------

[](#documentation)

### Retrieve Coordinates with address postal

[](#retrieve-coordinates-with-address-postal)

**Use Event Dispatcher**

```
$geolocationEvent = new GeolocationEvent();
$geolocationEvent->setAddress("134 route de Vertou 44200 Nantes");
$eventDispatcher->dispatch($geolocationEvent, GeolocationEvent::EVENT_YIPIKAI_GEOLOCATION_RETRIEVE);

// Get Latitude
$latitude = $geolocationEvent->getLatitude();

// Get Longitude
$longitude = $geolocationEvent->getLongitude();
```

**Use Service Container**

```
$coordinates = $this->container->get('yipikai.geolocation')->retrieveByAddress("134 route de Vertou 44200 Nantes");
/**
 * $coordinates = array:2 [
 *   "latitude" => 47.186543
 *   "longitude" => -1.528056
 * ]
 */
```

### Retrieve Coordinates with Object

[](#retrieve-coordinates-with-object)

```
...
use Yipikai\GeolocationBundle\Doctrine\Mapping as Geolocation;
class Object
{
  ...
  /**
   * @var string|null
   * @Geolocation\AddressStreet()
   */
  protected ?string $addressStreet = null;

  /**
   * @var string|null
   * @Geolocation\AddressCity()
   */
  protected ?string $city = null;

  /**
   * @var string|null
   * @Geolocation\AddressPostalCode()
   */
  protected ?string $postalCode = null;

  /**
   * @var string|null
   * @Geolocation\CoordinateLatitude()
   */
  protected ?string $latitude = null;

  /**
   * @var string|null
   * @Geolocation\CoordinateLongitude()
   */
  protected ?string $longitude = null;
  ...
}
```

**Use Event Dispatcher**

```
$object = new Object();
$object->setAddressStreet("134 route de Vertou");
$object->setCity("Nantes");
$object->setPostalCode("44200");

$geolocationEvent = new GeolocationEvent();
$geolocationEvent->setObject($object);
// hydrate auto latitude and longitude in to object
$geolocationEvent->setHydrateObject(true);

$eventDispatcher->dispatch($geolocationEvent, GeolocationEvent::EVENT_YIPIKAI_GEOLOCATION_RETRIEVE);

// Get Latitude
$latitude = $geolocationEvent->getLatitude();

// Get Longitude
$longitude = $geolocationEvent->getLongitude();

// Get Address
$address = $geolocationEvent->getAddress();
```

**Use Service Container**

```
$object = new Object();
$object->setAddressStreet("134 route de Vertou");
$object->setCity("Nantes");
$object->setPostalCode("44200");

$coordinates = $this->geolocation->retrieveByObject($object, true); // This second var is hydrate auto
$coordinates = $this->container->get('yipikai.geolocation')->retrieveByAddress("134 route de Vertou 44200 Nantes");
/**
 * $coordinates = array:2 [
 *   "latitude" => 47.186543
 *   "longitude" => -1.528056,
 *   "address" => "134 route de Vertou 44200 Nantes"
 * ]
 */
```

Commit Messages
---------------

[](#commit-messages)

The commit message must follow the [Conventional Commits specification](https://www.conventionalcommits.org/). The following types are allowed:

- `update`: Update
- `fix`: Bug fix
- `feat`: New feature
- `docs`: Change in the documentation
- `spec`: Spec change
- `test`: Test-related change
- `perf`: Performance optimization

Examples:

```
update : Something

fix: Fix something

feat: Introduce X

docs: Add docs for X

spec: Z disambiguation

```

License and Copyright
---------------------

[](#license-and-copyright)

See licence file

Credits
-------

[](#credits)

Created by [Matthieu Beurel](https://www.mbeurel.com). Sponsored by [Yipikai Studio](https://yipikai.studio).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

672d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

1.0.x-devPHP ^7.4 || ^8.0 || ^8.1 || ^8.2

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

symfonygeolocationData Gouv France

### Embed Badge

![Health badge](/badges/yipikai-geolocation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/yipikai-geolocation-bundle/health.svg)](https://phpackages.com/packages/yipikai-geolocation-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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