PHPackages                             rapidwebltd/simple-google-maps-api - 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. rapidwebltd/simple-google-maps-api

ActiveLibrary

rapidwebltd/simple-google-maps-api
==================================

a simple api for the google maps services

v2.0.2(8y ago)213.8k↓48.3%1LGPL-3.0-onlyPHP

Since Mar 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rapidwebltd/php-simple-google-maps-api)[ Packagist](https://packagist.org/packages/rapidwebltd/simple-google-maps-api)[ RSS](/packages/rapidwebltd-simple-google-maps-api/feed)WikiDiscussions master Synced 1mo ago

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

This library allows a user to easily communicate with the Google Maps API and retrieve a set of coordinates from an address.

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

[](#installation)

To install, just run the following composer command.

`composer require rapidwebltd/simple-google-maps-api`

Remember to include the `vendor/autoload.php` file if your framework does not do this for you.

Usage
-----

[](#usage)

Creating the SimpleGoogleMaps Object can be done in one of two ways.

The first way is to pass through just the API key that you are provided upon registering for the Google Maps API.

```
use RapidWeb\SimpleGoogleMaps\Factories\SimpleGoogleMapsFactory;
$simpleGoogleMaps = SimpleGoogleMapsFactory::getByKey("[APIKEY]");
```

The second way is to provide your client name and the crypt key that you are provided with upon creating a Google enterprise account.

```
use RapidWeb\SimpleGoogleMaps\Factories\SimpleGoogleMapsFactory;
$simpleGoogleMaps = SimpleGoogleMapsFactory::getByClientNameAndCryptKey("[CLIENTNAME]","[CRYPTKEY]");
```

Once you have created the object you can then get the coordinates from an address via the `getByAddress` method.

```
$addressline = "10 Downing St, Westminster, London SW1A UK";
$homeCoords = $simpleGoogleMaps->getByAddress($addressline);
```

Optionally, you can allow partial matches to be returned if your input address is not highly accurate. You can do so with the `allowPartialMatches` method, as shown below.

```
$simpleGoogleMaps->allowPartialMatches();
$homeCoords = $simpleGoogleMaps->getByAddress('test address');
```

The above method will return a object of type LatLong, this allows you to access the coordinates like so.

```
$latitude = $homeCoords->lat;
$longitude = $homeCoords->long;
```

You can also calculate the distance between two LatLong objects by using the `distanceTo` method on the LatLong Object.

```
$milesBetween = $homeCoords->distanceTo($toCoords);
```

By default this will return the answer in miles, you may also request the distance in kilometres by adding it to the method call.

```
$milesBetween = $homeCoords->distanceTo($toCoords,"kilometres");
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~34 days

Recently: every ~54 days

Total

10

Last Release

3031d ago

Major Versions

v1.2.1 → v2.0.02017-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (4 commits)")[![kirstyg](https://avatars.githubusercontent.com/u/6988205?v=4)](https://github.com/kirstyg "kirstyg (1 commits)")[![kirsty-gasston](https://avatars.githubusercontent.com/u/12949343?v=4)](https://github.com/kirsty-gasston "kirsty-gasston (1 commits)")

---

Tags

distancegoogle-apigoogle-mapslatlongphp-library

### Embed Badge

![Health badge](/badges/rapidwebltd-simple-google-maps-api/health.svg)

```
[![Health](https://phpackages.com/badges/rapidwebltd-simple-google-maps-api/health.svg)](https://phpackages.com/packages/rapidwebltd-simple-google-maps-api)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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