Download the PHP package langleyfoxall/simple-google-maps without Composer

On this page you can find all versions of the php package langleyfoxall/simple-google-maps. 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 simple-google-maps

PHP Simple Google Maps

StyleCI

This package provides a simple PHP client for various Google Maps APIs.

Installation

To install, just run the following composer command.

Remember to include the vendor/autoload.php file if your framework does not do this for you.

Usage

To use Simple Google Maps, you must first create a new instance. This can be done is two ways, dependant on whether you have a standard API key, or a clientName and cryptKey (for enterprise / premium plans).

Geocoding

To convert an address to a set of GPS coordinates, use the geocode method, as shown below.

Optionally, you can allow partial matches to be returned if your input address is not highly accurate. You can do so with the allowPartialMatches method, as shown below.

The above method will return a object of type LatLong, which allows you to access the GPS coordinates as shown below.

You can also calculate the distance between two LatLong objects by using the distanceTo method. The distance is returned in kilometers, and takes into account the curvature of the Earth using the Haversine formula.

Reverse Geocoding

To lookup an address from a set of GPS coordinate, use the reverseGeocode method, as shown below.

This method will return a string containing the address found at the specified coordinates. If no address could be found, null will be returned.

Directions

To find the directions between two points, use the directions method. The methods expects three parameters, the origin, the destination, and optionally the travel mode as defined by the TravelMode enum.

See the example usage below.

This will produce output similar to the following.


All versions of simple-google-maps with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.2||^7.0
divineomega/do-file-cache Version ^2.0
divineomega/php-distance Version ^1.0
laravel/framework Version ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
ext-json Version *
php Version >=7.0||>=8.0
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 langleyfoxall/simple-google-maps contains the following files

Loading the files please wait ....