PHPackages                             frolki1\_dev/google-embed-php - 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. [API Development](/categories/api)
4. /
5. frolki1\_dev/google-embed-php

ActiveLibrary[API Development](/categories/api)

frolki1\_dev/google-embed-php
=============================

Use the Embed API of Google Maps with PHP

v1.0(9y ago)130[2 issues](https://github.com/Frolki1-Dev/google-embed-php/issues)MITPHPPHP ^7.0

Since Apr 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Frolki1-Dev/google-embed-php)[ Packagist](https://packagist.org/packages/frolki1_dev/google-embed-php)[ RSS](/packages/frolki1-dev-google-embed-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Google Embed PHP
================

[](#google-embed-php)

[![Build Status](https://camo.githubusercontent.com/3061cf5f3c536d6e903e90fa8c06ef73a6c8dfa7cc9143eaa7149518e3b8283b/68747470733a2f2f7472617669732d63692e6f72672f46726f6c6b69312d4465762f676f6f676c652d656d6265642d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Frolki1-Dev/google-embed-php)[![codecov](https://camo.githubusercontent.com/081ff9306af900b642455a0a85aab8b7c8e1d9faae4323832c053d951d46c88d/68747470733a2f2f636f6465636f762e696f2f67682f46726f6c6b69312d4465762f676f6f676c652d656d6265642d7068702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Frolki1-Dev/google-embed-php)[![GitHub issues](https://camo.githubusercontent.com/391a6d5dce9d9359ab5195658310b42962fc2320d1ec51a02e7ef1ad6f847228/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f46726f6c6b69312d4465762f676f6f676c652d656d6265642d7068702e737667)](https://github.com/Frolki1-Dev/google-embed-php/issues)[![Packagist](https://camo.githubusercontent.com/635dbbcd49c80a37d73b1f154783b2b33e32822c5e9608548595412f64a69b19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66726f6c6b69315f6465762f676f6f676c652d656d6265642d7068702e737667)](https://packagist.org/packages/frolki1_dev/google-embed-php)[![Packagist Pre Release](https://camo.githubusercontent.com/7b190005debfd015c7511164a3bed766b00ac0a1c5d64435bf2bbc54c294ee87/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f66726f6c6b69315f6465762f676f6f676c652d656d6265642d7068702e737667)](https://packagist.org/packages/frolki1_dev/google-embed-php)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/Frolki1-Dev/google-embed-php/master/LICENSE)

Use the Embed API of Google Maps with PHP

Requirement
-----------

[](#requirement)

To use this library you must have at least PHP 7.0.

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

[](#installation)

The Google Embed can be installed with [Composer](https://getcomposer.org/). Run this command:

```
composer require frolki1_dev/google-embed-php
```

Usage
-----

[](#usage)

To use this library you must have an api key. You can get the free version because you can use the embed api for free.

```
use Frolki1_Dev\GoogleEmbedMap;

$maps = new GoogleEmbedMap();

// Create a direction map
$direction = $maps->createDirectionsMap();

// Create a place map
$place = $maps->createPlaceMap();

// Crsate a search map
$search = $maps->createSearchMap();

// Create a view map
$view = $maps->createViewMap();
```

Options
-------

[](#options)

You have the following options in every map type:

```
// Set a location (street, location, place)
$mapType->setLocation();

// Set the center of the view (latitude and longitude)
$mapType->setCenter(, );

// Set the zoom factor (0 - 21, 0 = Whole world, 21 = A single building)
$mapType->setZoom();

// Define the UI language
$mapType->setLanguage();

// Show the map as a road map
$mapType->useRoadMap();

// Show the map as a satellite map
$mapType->useSatelliteMap();

// Get the source (url)
$mapType->getSource();

// Build a iframe
$mapType->getIFrame();
```

### Direction options

[](#direction-options)

The direction map has also the options and the following methods:

```
// How the method setLocation but only the start point
$direction->start();

// Same how method start but only the destination point
$direction->destination();

// Add waypoints (Can be multiple called)
$direction->addWayPoint();

// Calculate the route with the car
$direction->drivingMode();

// Calculate the route with walking
$direction->walkingMode();

// Calculate the route with biking
$direction->bicyclingMode();

// Calclate the route with flying
$direction->flyingMode();

// Avoid tolls
$direction->avoidTolls();

// Avoid Ferry
$direction->avoidFerries();

// Avoid Highway
$dircetion->avoidHighways();

// Use the metric unit
$direction->useMetricUnit();

// Use the imperial unit
$direction->useImperialUnit();
```

License
-------

[](#license)

This library is an open source project and is licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3349d ago

Major Versions

v0.1 → v1.02017-04-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/a05d2949e64b76cf48fb48bd4ff0a8096fefb821cd0fa422d28c45ed285b5a3f?d=identicon)[Frolki1\_Dev](/maintainers/Frolki1_Dev)

---

Tags

apiembedgooglemapsphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/frolki1-dev-google-embed-php/health.svg)

```
[![Health](https://phpackages.com/badges/frolki1-dev-google-embed-php/health.svg)](https://phpackages.com/packages/frolki1-dev-google-embed-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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