# mageplaza/module-google-maps

> Magento 2 Google Maps Extension

`composer require mageplaza/module-google-maps`

Canonical URL: https://packagento.com/mageplaza/module-google-maps

## At a glance

- **Vendor**: mageplaza (https://packagento.com/mageplaza.md)
- **Latest version**: 4.0.4 — released 2025-03-20
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/mageplaza/module-google-maps and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require mageplaza/module-google-maps:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 Google Maps Extension

## README


**[M2 Google Maps extension](https://www.mageplaza.com/magento-2-google-maps/) by Mageplaza** allows stores to set the location on the web page. The  Contact Us page with information about real location will make your site become more professional and reliable in the customer’s mind. 

[![Latest Stable Version](https://poser.pugx.org/mageplaza/module-google-maps/v/stable)](https://packagist.org/packages/mageplaza/module-google-maps)
[![Total Downloads](https://poser.pugx.org/mageplaza/module-google-maps/downloads)](https://packagist.org/packages/mageplaza/module-google-maps)

**IMPORTANT NOTE:** This version of Mageplaza Google Maps extension on Github is free as a contribution to the Magento community from Mageplaza. This package does not include the technical support. Should you need technical support for this extension, you will have to buy a license from Mageplaza. [Click here to buy](https://www.mageplaza.com/magento-2-google-maps/).

### 1. Documentation

- [Installation guide](https://www.mageplaza.com/install-magento-2-extension/)
- [User guide](https://docs.mageplaza.com/google-maps/index.html)
- [Introduction page](http://www.mageplaza.com/magento-2-google-maps/)
- [Contribute on Github](https://github.com/mageplaza/magento-2-google-maps)
- [Get Support](https://github.com/mageplaza/magento-2-google-maps/issues)

### 2. FAQs

**Q: I got error: Mageplaza_Core has been already defined**

A: Read solution [here](https://github.com/mageplaza/module-core/issues/3).

**Q: Where the map can be displayed on my page?**

A: Google Maps can be set at the top or bottom of Contact Page, by navigating to `Store > Settings > Configuration > Mageplaza Extensions > Google Maps > General > Position` and select the appropriate position.

**Q: Can I customize how the map can be seen on the website?**

A: Absolutely yes, there are 4 map types and 10 map styles for you to choose.

**Q: Can the customer drag and zoom in/out the map?**

A: The customer can easily drag to see the surrounding area of the store. However, it is unable to zoom the map, this feature is available in [Mageplaza Store Locator](https://www.mageplaza.com/magento-2-store-locator/).

**Q: How my store will look like on the map?**

A: There is a customizable Marker showing the exact position of your store. You can freely choose the Marker icon to be displayed.

**Q: Will the map be available on mobile devices?**

A: Yes, the extension works well on the mobile version.

### 3. How to install Magento 2 Google Maps extension

Install via composer (recommend)

Run the following command in Magento 2 root folder:

With Marketing Automation (recommend):
```
composer require mageplaza/module-google-maps mageplaza/module-smtp
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

Without Marketing Automation:
```
composer require mageplaza/module-google-maps
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

### 4. Google Maps Highlight Features

#### Add Google Maps to Contact Page

No more boring text to show the store location, store owners now can get the Contact Page with a more eye-catching view by Google Maps, with a marker showing exactly the store location.
Magento 2 Google Maps extension by Mageplaza enable the store owner to set the position of the map at the top or bottom of the Contact Page.

![Magento 2 Add Google Maps to Contact Page](https://i.imgur.com/XvKPOc7.png)

#### Adjustable map’s display

**Google Maps plugin** let the website admin be possible to change how it appears on frontend flexibly. The marker showing the exact location can be configured freely. Furthermore, there are 4 options for map type which are:
- Terrain 
- Roadmap
- Satellite
- Hybrid

And 10 available map styles:
- Default 
- Blue Essence
- Dark Green
- Dark Grey
- Desert
- Light Blue Water
- Light Dream
- Light Grey
- Mid Night
- Nature Color

![magento 2 Google Maps plugin](https://i.imgur.com/xjVeMQw.gif)

#### Optional maps embedding 

**Mageplaza Google Maps module** offers 2 options to add a map on the website. The first option is using Google API key, which gets the allowance to be displayed map from Google. The second one is directly embedding Google iFrame code, which is more simple.

![Magento 2 Optional maps embedding](https://i.imgur.com/uEubJ59.png)

#### Automatically get GPS coordinates

By using Google API key, once the address information is provided, GPS coordinates can be automatically defined according to the latitude and longitude. These coordinates can be adjusted by the admin, to get the exact location for the marker.

![Magento 2 Automatically get GPS coordinates](https://i.imgur.com/WM5rPrr.gif)

### 5. More features 

##### Map dragging

It is able to drag the map and see the surrounding area of the store location.

##### Mobile friendliness

**Magento 2 Google Maps** can work well with both mobile and desktop devices.

##### Extension compatibility 

Google Maps extension is responsive with **Mageplaza Store Locator Extension**. It is also compatible with almost third-party modules.

### 6. Full Magento 2 Google Maps features

#### For store owners

- Easily enable/ disable the Google Maps
- Select the map’s position on Contact Page
- 2 options to validate Google Map: Google API key/ Embedded code
- 4 options for map type
- 10 options for map style
- Enable/Disable map dragging
- Set default enlargement for map
- Adjustable Marker icon
- Automatically get GPS coordinates after inserting store address

#### For shoppers

- View store location more visually
- Visually view the location of the store
- Be able to drag the map and view the surrounding location
- Feel more reliable about the contact information

### 7. User Guide

Magento 2 default Contact Us Page is too simple, it only allows displaying text. With the new extensio

_(README truncated for .md surface. Full README on https://packagento.com/mageplaza/module-google-maps.)_

## Changelog

CHANGELOG: https://www.mageplaza.com/releases/google-maps/

## Recent Versions

| Version | Released |
|---|---|
| 4.0.4 | 2025-03-20 |
| 4.0.3 | 2023-07-27 |
| 1.0.5 | 2021-08-22 |
| 4.0.2 | 2021-08-22 |
| 4.0.1 | 2021-06-06 |
| 4.0.0 | 2021-03-23 |
| 1.0.4 | 2020-10-09 |
| 1.0.3 | 2020-07-31 |
| 1.0.2 | 2019-07-31 |
| 1.0.1 | 2018-12-18 |

Showing 10 of 11 versions. Full release history on https://packagento.com/mageplaza/module-google-maps.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| mageplaza/module-core | ^1.5.12 |

## Quality

Latest release (4.0.4) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 65 | 65 warnings (ruleset: Magento2) — 25 auto-fixable with phpcbf |
| PHPMD | Pass | 0 |  |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 58 | 58 | – | – |
| 2.4.8 | – | 58 | 58 | – |
| 2.4.9 | – | – | 56 | 56 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["mageplaza/module-google-maps"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

mageplaza is a Magento 2 vendor on Packagento. See https://packagento.com/mageplaza.md for their full catalogue.

