PHPackages                             pschocke/google-maps-links - 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. pschocke/google-maps-links

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

pschocke/google-maps-links
==========================

easily create google maps links to link to a map

v1.1(3y ago)253212MITPHP

Since Oct 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pschocke/google-maps-links)[ Packagist](https://packagist.org/packages/pschocke/google-maps-links)[ Docs](https://github.com/pschocke/google-maps-links)[ RSS](/packages/pschocke-google-maps-links/feed)WikiDiscussions master Synced 1mo ago

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

Google Maps Links
=================

[](#google-maps-links)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4efc7820e6e4dd159f8cf66286b52557d7194ddb57c32a9c31bf41a42414b778/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707363686f636b652f676f6f676c652d6d6170732d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pschocke/google-maps-links)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1d3ea141c7998f06f8547bac6d8da27e7da3e86d223680ad90fa18e8e93c13fc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f707363686f636b652f676f6f676c652d6d6170732d6c696e6b732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/pschocke/google-maps-links/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/234b756fb98c8d056edbd6122be1f486fe4d3c35240f8ddf57f3eef19309d8e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f707363686f636b652f676f6f676c652d6d6170732d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pschocke/google-maps-links)

This package adds a lightweight way to link to a specific location, start a direction, show a map or jump into street view in google maps.

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

[](#installation)

You can install the package via composer:

```
composer require pschocke/google-maps-links
```

Usage
-----

[](#usage)

#### Search

[](#search)

You can search for a location or coordinates. Optionally you can add a place id that google maps will use if it can't find your specified location/coordinates

```
$gMapsLocation = new pschocke\GoogleMapsLinks\GMapsLocation();

// Get the link to a specific search location
$link = $gMapsLocation->location('Towerbridge');

// Get the link to coordinates
$link = $gMapsLocation->coordinates('53.541321', '9.983945');

// Optionally attach a query_place_id
$link = $gMapsLocation->queryPlaceId('ChIJT8RwZwaPsUcRhkKYaCqr5LI')->coordinates('53.541321', '9.983945');
$link = $gMapsLocation->queryPlaceId('ChIJT8RwZwaPsUcRhkKYaCqr5LI')->location('Towerbridge');
```

#### Direction

[](#direction)

You can show a direction:

```
$gMapsDirection = new pschocke\GoogleMapsLinks\GMapsDirection();

// Get the link to start a direction from a specific place
$link = $gMapsDirection->from('Towerbridge')->get();

// Get the link to start a direction from a specific place to a specific place
$link = $gMapsDirection->from('Towerbridge')->to('Big Ben')->get();

// Optionally specify a travel method
$link = $gMapsDirection->from('Towerbridge')->to('Big Ben')->travelMethod('bicycling')->get();
```

#### Map

[](#map)

You can link to a map with no markers:

```
$gMapsMap = new pschocke\GoogleMapsLinks\GMapsMap();

// Get the link to start a map by specifing a center coordinate
$link = $gMapsMap->center('-33.712206', '150.311941')->get();

// Optionally specify a zoom level ranging from 0 (the whole world) to 21 (individual buildings), defaults to 15
$link = $gMapsMap->center('-33.712206', '150.311941')->zoom(6)->get();

// Optionally change the basemap (roadmap (default), satellite, or terrain)
$link = $gMapsMap->center('-33.712206', '150.311941')->basemap('satellite')->zoom(6)->get();

// Optionally change the layer of the map: none (default), transit, traffic, or bicycling
$link = $gMapsMap->center('-33.712206', '150.311941')->layer('transit')->basemap('satellite')->zoom(6)->get();
```

#### Street View

[](#street-view)

You can create a link to directly open a street view panorama

```
$gMapsStreetView = new pschocke\GoogleMapsLinks\GMapsStreetView();

// Get the link to display a panorama from a viewpoint cooridnate
$link = $gMapsStreetView->viewpoint('48.857832', '2.295226')->get();

// You can also provide a pano id, the viewpoint is used if the pano id does not exisits
$link = $gMapsStreetView->pano('tu510ie_z4ptBZYo2BGEJg')->viewpoint('48.857832', '2.295226')->get();

// Optionally you can change the heading, pitch and fov parameter
$link = $gMapsStreetView->pano('tu510ie_z4ptBZYo2BGEJg')->viewpoint('48.857832', '2.295226')->heading('-45')->pitch(38)->fov(80)->get();
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Patrick Schocke](https://github.com/pschocke)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

1197d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cd89f9905a333779736ad73453f1cfc4c13bf89471e2427975aa43927bb1419?d=identicon)[pschocke](/maintainers/pschocke)

---

Top Contributors

[![pschocke](https://avatars.githubusercontent.com/u/26882621?v=4)](https://github.com/pschocke "pschocke (13 commits)")

---

Tags

google-mapsgoogle-maps-linksphpgoogle mapsGoogle Maps links

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/pschocke-google-maps-links/health.svg)

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

###  Alternatives

[mediawiki/maps

Adds various mapping features to MediaWiki

84145.0k3](/packages/mediawiki-maps)[arbermustafa/filament-locationpickr-field

Location picker field for Filament Php using Google Maps

1539.0k](/packages/arbermustafa-filament-locationpickr-field)[codewithdennis/filament-simple-map

This package offers a straightforward and easy-to-use map action component for your Filament application.

365.8k](/packages/codewithdennis-filament-simple-map)[dynamic/silverstripe-locator

SilverStripe Locator Module. Show locations on a map. Search by geoposition.

2113.2k1](/packages/dynamic-silverstripe-locator)[fahiem/filament-pinpoint

Google Maps location picker component for Filament 4 &amp; 5 with search, draggable marker, and reverse geocoding

136.5k](/packages/fahiem-filament-pinpoint)[weboftalent/mappable

Fork of Uncle Cheese's original Mappable module. Inline JavaScript is minimal, and templated such that other mapping systems can be added later. A map editing interface is also included, addable by a one line configuration call.

101.5k4](/packages/weboftalent-mappable)

PHPackages © 2026

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