Download the PHP package alex-kalanis/google-maps-php-services without Composer

On this page you can find all versions of the php package alex-kalanis/google-maps-php-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-maps-php-services

Google Maps Services for PHP


PHP client library(SDK) for Google Maps API Web Services.

Fork of older Nick Tsai's library.

Build Status Scrutinizer Code Quality Latest Stable Version Minimum PHP Version Downloads License Code Coverage

Differences:

OUTLINE


DEMONSTRATION

For nearly any raw php / custom frameworks:

Then on desired pages:

For Laravel:

And then in the controller is the code the same as in another random framework.

For Symfony:

For Nette:

Or with parameters for different servers/services:

And then in class like in other frameworks with DI.


DESCRIPTION

The PHP Client for Google Maps Services is a PHP Client library for the following Google Maps APIs:


REQUIREMENTS

API keys

Each Google Maps Web Service request requires an API key or client ID. API keys are freely available with a Google Account at https://developers.google.com/console. The type of API key you need is a Server key.

To get an API key:

  1. Visit https://developers.google.com/console and log in with a Google Account.
  2. Select one of your existing projects, or create a new project.
  3. Enable the Google Maps Services API(s) you plan to use, such as:

    • Directions API
    • Distance Matrix API
    • Geocoding API
    • Places API
    • Roads API
    • Time Zone API
    • Nearby API
  4. Create a new Server key.
  5. If you'd like to restrict requests to a specific IP address, do so now.

For guided help, follow the instructions for the Directions API. You only need one API key, but remember to enable all the APIs you need. For even more information, see the guide to API keys.

Important: This key should be kept secret on your server.


INSTALLATION

Run Composer in your project:

composer require alex-kalanis/google-maps-php-services

Then you could call it after Composer is loaded depended on your PHP framework:


USAGE

Before using any Google Maps Services, first you need to create a Client with configuration, then use the client to access Google Maps Services.

Client

Create a Client using API key:

Language

You could set language for Client for all services:

list of supported languages - Google Maps Platform

APIs

Elevation API

Elevation API overview | Google for Developers

Routes API

Get a route | Google for Developers

Roads API

Snap to Roads | Google for Developers

Directions API

Getting directions | Google for Developers

Distance Matrix API

Get started with the Distance Matrix API | Google for Developers

Geocoding API

Geocoding API overview | Google for Developers

Geolocation API

Geolocation API overview | Google for Developers

Time Zone API

Time Zone API overview | Google for Developers

Nearby API

Nearby API overview | Google for Developers

Find by Place API

Find by Place API overview | Google for Developers

Find by Text API

Find by Text API overview | Google for Developers

Place details API

Place details API overview | Google for Developers


All versions of google-maps-php-services with dependencies

PHP Build Version
Package Version
Requires psr/http-client Version ^1.0
psr/http-message Version ^2.0
php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alex-kalanis/google-maps-php-services contains the following files

Loading the files please wait ....