PHPackages                             falco442/gps - 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. falco442/gps

ActiveCakephp-plugin[Framework](/categories/framework)

falco442/gps
============

Gps plugin for CakePHP

v1.2(9y ago)06PHPPHP &gt;=5.4.16

Since Nov 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/falco442/Cakephp-3-gps)[ Packagist](https://packagist.org/packages/falco442/gps)[ RSS](/packages/falco442-gps/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Introduction
============

[](#introduction)

This plugin enable the search for some entity, given its coordinates.

Requirements:

- CakePHP 3.x

Installation
============

[](#installation)

Table entry
-----------

[](#table-entry)

Add the fields (choose your names, or use the default 'latitude' and 'longitude'). I suggest to use the `FLOAT(10,6)`. Note that, if you change the field names, you must provide them in the plugin configuration.

Setting up the code
-------------------

[](#setting-up-the-code)

Add in `config/bootstrap.php` the line

```
Plugin::load('Gps');
```

and in `src/Model/Table/YourModelTable.php` the lines

```
class ArticlesTable extends Table
{
    public function initialize(array $config)
    {
    	...
        $this->addBehavior('Gps.Gps');
        ...
    }
}
```

You can also provide a configuration with the plugin, extending this lines:

```
class ArticlesTable extends Table
{
    public function initialize(array $config)
    {
    	...
        $this->addBehavior('Gps.Gps',[
        	'radius'=>6896000000.231,
        	'fields'=>[
        		'latitude'=>'lat',
        		'longitude'=>'lon'
        	]
        ]);
        ...
    }
}
```

For example, in this configuration, we're informing the plugin that the fields in the table will be of names 'lat' for latitude, and 'lon' for longitude. The Earth radius will be of `6896000000.231` km.

Usage
-----

[](#usage)

in `src/Controller/YourModelController`, for example, in a `nearBy` action, you could have

```
public function nearBy(){
	$yourmodel = $this->YourModel->find('near',['gps'=>$this->request->query]);
	$this->set(compact('yourmodel'));
	$this->set('_serialize',['yourmodel']);
}
```

and so the conditions will be the ones urlencoded:

```
http://yourdomain.com/youmodel/near-by.json?latitude=43.2&longitude=24.356&radius=20000

```

With this url we're telling ours API software to take the objects in a square with center in `43.2`,`24.35` and side of `20000` meters

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3620abbff28b3934d7ab220236a87b0e9317bdf2a94bbbed68b8ea633a7a417b?d=identicon)[falco442](/maintainers/falco442)

---

Top Contributors

[![falco442](https://avatars.githubusercontent.com/u/11598209?v=4)](https://github.com/falco442 "falco442 (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/falco442-gps/health.svg)

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

###  Alternatives

[cakephp/debug_kit

CakePHP Debug Kit

86514.0M138](/packages/cakephp-debug-kit)[cakephp/bake

Bake plugin for CakePHP

11211.2M158](/packages/cakephp-bake)[friendsofcake/bootstrap-ui

Bootstrap front-end framework support for CakePHP

3492.1M32](/packages/friendsofcake-bootstrap-ui)[cakephp/app

CakePHP skeleton app

3831.7M1](/packages/cakephp-app)[cakephp/localized

CakePHP Localized Plugin

218595.6k5](/packages/cakephp-localized)[cakephp/acl

Acl Plugin for CakePHP framework

109553.9k15](/packages/cakephp-acl)

PHPackages © 2026

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