PHPackages                             kinglozzer/silverstripegmapsobject - 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. [Templating &amp; Views](/categories/templating)
4. /
5. kinglozzer/silverstripegmapsobject

ActiveSilverstripe-vendormodule[Templating &amp; Views](/categories/templating)

kinglozzer/silverstripegmapsobject
==================================

Add a Google Map (optionally with Streetview) to a DataObject or Page

2.1.0(2y ago)168.6k5[1 issues](https://github.com/kinglozzer/silverstripe-gmapsobject/issues)BSD-3-ClausePHP

Since Sep 30Pushed 2y ago3 watchersCompare

[ Source](https://github.com/kinglozzer/silverstripe-gmapsobject)[ Packagist](https://packagist.org/packages/kinglozzer/silverstripegmapsobject)[ Docs](http://github.com/kinglozzer/silverstripe-gmapsobject)[ RSS](/packages/kinglozzer-silverstripegmapsobject/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (12)Used By (0)

Updated to php 8.1 and Silverstripe v5

SilverStripeGMapsObject
=======================

[](#silverstripegmapsobject)

A module to add a Google Map (optionally with Streetview) to a DataObject or Page, with users able to specify a location marker in the CMS. No front-end implementation is provided, though simple examples are shown below.

By: Loz Calver - [Bigfork Ltd](http://www.bigfork.co.uk/).

[![](screenshots/screen.png)](screenshots/screen.png)

Installation:
-------------

[](#installation)

### Composer:

[](#composer)

```
require: "kinglozzer/silverstripegmapsobject": "^2"

```

### Enable:

[](#enable)

Apply the extension `Kinglozzer\SilverStripeGMapsObject\Extension` to the DataObject or page type that you require a map on and do a `dev/build?flush=1`.

```
Page:
  extensions:
    - Kinglozzer\SilverStripeGMapsObject\Extension
```

You'll then see the new 'Google Map' tab on your DataObject / Page edit form. You also need to specify your Google Maps API key in the 'Settings' area of the CMS before you'll be able to see the map.

Front-end Examples:
-------------------

[](#front-end-examples)

The co-ordinates (and heading/pitch if you're using Streetview) are stored in the following database fields:

- Latitude
- Longitude
- Heading
- Pitch

You'll need to give your JavaScript access to these properties, one method of doing this is as follows:

```
class PageController extends ContentController
{
    public function init()
    {
        parent::init();

        // Fetch the Google Maps API key from the site settings
        $key = SiteConfig::current_site_config()->GMapsAPIKey;
        Requirements::javascript('https://maps.googleapis.com/maps/api/js?key='.$key.'&sensor=false');

        Requirements::customScript(Heading,
    'pitch': $this->Pitch
};
JS
        );
    }
}
```

Example JavaScript implementation:

```
// Assumes one div with the id "map"
var latLng = new google.maps.LatLng(gMap.lat,gMap.lon),
    map = new google.maps.Map(document.getElementById("map"), {
        center: latLng,
        zoom: 14,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }),
    marker = new google.maps.Marker({
        position: latLng,
        map: map,
        title: 'My location'
    });
```

Example JavaScript implementation including Streetview:

```
// Assumes two divs, one with the id "map" and one with the id "street-view"
var panorama = new  google.maps.StreetViewPanorama(document.getElementById("street-view"), {
        position: new google.maps.LatLng(gMap.lat,gMap.lon),
        visible: true,
        pov: {
            heading: gMap.heading,
            pitch: gMap.pitch
        }
    });
    var map = new google.maps.Map(document.getElementById("map"), {
        center: new google.maps.LatLng(gMap.lat,gMap.lon),
        zoom: 14,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        streetViewControl: true,
        streetView: panorama
    });

    google.maps.event.addListener(panorama, "position_changed", function() {
        map.setCenter(panorama.getPosition());
    });
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~384 days

Recently: every ~635 days

Total

11

Last Release

768d ago

Major Versions

1.0.x-dev → 2.0.02017-11-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/203294386?v=4)[-&gt; lozcalver](/maintainers/kinglozzer)[@kinglozzer](https://github.com/kinglozzer)

---

Top Contributors

[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (25 commits)")[![LukasViolet88](https://avatars.githubusercontent.com/u/155470295?v=4)](https://github.com/LukasViolet88 "LukasViolet88 (1 commits)")

---

Tags

googlesilverstripemapviewgmapstreetviewstreet

### Embed Badge

![Health badge](/badges/kinglozzer-silverstripegmapsobject/health.svg)

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

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[cornford/googlmapper

An easy way to integrate Google Maps with Laravel.

457447.9k4](/packages/cornford-googlmapper)[cmen/google-charts-bundle

This Bundle provides a Twig extension and PHP objects to display Google charts in your Symfony application.

76844.8k2](/packages/cmen-google-charts-bundle)[farhanwazir/laravelgooglemaps

Laravel Google Map package for 5.x. You can use all google map features in laravel.

15542.0k2](/packages/farhanwazir-laravelgooglemaps)[axllent/silverstripe-tiled-gridfield

Inline/tiled images in a Silverstripe GridField table

163.2k](/packages/axllent-silverstripe-tiled-gridfield)

PHPackages © 2026

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