PHPackages                             markuskooche/geocode - 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. [API Development](/categories/api)
4. /
5. markuskooche/geocode

Abandoned → [geocoder-php/common-http](/?search=geocoder-php%2Fcommon-http)Library[API Development](/categories/api)

markuskooche/geocode
====================

A simple wrapper for (reverse) geocoding.

v0.3-beta(3y ago)21.1kMITPHPPHP ^8.1

Since May 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/markuskooche/Geocode)[ Packagist](https://packagist.org/packages/markuskooche/geocode)[ Docs](https://github.com/markuskooche/geocode)[ RSS](/packages/markuskooche-geocode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (4)Used By (0)

Geocode - A simple wrapper for (reverse) geocoding
==================================================

[](#geocode---a-simple-wrapper-for-reverse-geocoding)

Installation
------------

[](#installation)

```
composer require markuskooche/geocode

```

Usage
-----

[](#usage)

### How to geocode

[](#how-to-geocode)

```
use Illuminate\Support\Collection;
use Markuskooche\Geocode\Geocode;

// Get the longitude and latitude of a location.
$street = 'Pennsylvania Avenue Northwest';
$number = '1917';
$city = 'Washington';
$zip = '20500';

// You only need api key for the google maps driver.
// The standard driver will use the openstreet maps api.
$geocode = new Geocode();
$coordinates = $geocode->coordinates($street, $number, $city, $zip);
```

```
/**
 * The coordinates is returned as a collection.
 * @var Collection $coordinates
 */
$coordinates = [
    'longitude' => '-77.037852'
    'latitude'  => '38.898556',
];
```

### How to reverse geocode

[](#how-to-reverse-geocode)

```
use Illuminate\Support\Collection;
use Markuskooche\Geocode\Geocode;

// Get the street, number, city and zip of a location.
$longitude = -77.0442641;
$latitude = 38.9004915;

// You only need api key for the google maps driver.
// The standard driver will use the openstreet maps api.
$geocode = new Geocode();
$address = $geocode->address($longitude, $latitude);
```

```
/**
 * The address is returned as a collection.
 * @var Collection $address
 */
$address = [
    'street' => 'Pennsylvania Avenue Northwest',
    'number' => '1917',
    'city'   => 'Washington',
    'zip'    => '20500',
];
```

### Export the configuration

[](#export-the-configuration)

```
php artisan vendor:publish --provider="Markuskooche\Geocode\GeocodeServiceProvider" --tag="config"
```

Licence
-------

[](#licence)

Geocode is an open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~179 days

Total

3

Last Release

1111d ago

PHP version history (2 changes)v0.1.3-alphaPHP ^8.0

v0.3-betaPHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![markuskooche](https://avatars.githubusercontent.com/u/33030040?v=4)](https://github.com/markuskooche "markuskooche (1 commits)")

---

Tags

geocodegooglemapslaravelopenstreetmappackagephpreversephpapigeocodinglatitudelongitudegeocodereverse

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/markuskooche-geocode/health.svg)

```
[![Health](https://phpackages.com/badges/markuskooche-geocode/health.svg)](https://phpackages.com/packages/markuskooche-geocode)
```

###  Alternatives

[jcf/geocode

Google Geocoding API for Laravel

48160.5k](/packages/jcf-geocode)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[jackmartin/laravel-yandex-geocode

Simply service laravel Yandex Geocoding

1016.6k](/packages/jackmartin-laravel-yandex-geocode)[1001pharmacies/geolocation-bundle

Provides an abstraction layer for geocoding services.

116.8k](/packages/1001pharmacies-geolocation-bundle)

PHPackages © 2026

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