Download the PHP package powlam/coordinates without Composer

On this page you can find all versions of the php package powlam/coordinates. 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 coordinates

Coordinates for Php

GitHub Workflow Status (master) Total Downloads Latest Version License


This package provides a handful of tools to work with coordinates the same way as Google Maps Javascript API does.

Requires PHP 8.3+

Classes

LatLng class

A LatLng is a point in geographic coordinates: latitude and longitude. Both parameters are of float type.

LatLngAltitude class

A LatLngAltitude is a 3D point in geographic coordinates: latitude, longitude, and altitude.

LatLngBounds class

A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180-degree longitudinal meridian.

Features

Movement

Both LatLng and LatLngAltitude points are movable, so they can be moved in any direction using the move method.

Note: Latitude movements stop when reaching the North or South Pole.

Moving areas

The LatLngBounds rectangles are also movable; the entire area is moved at once.

When moving a LatLngBounds rectangle towards east or west using meters or kilometers, the conversion between distance and degrees depends on the latitude. The corresponding degrees will be calculated based on the midpoint latitude of the area.

Interaction between bounds

LatLngBounds classes can interact with each other:

Also a LatLngBounds can interact with a LatLng point:

Unions and extensions are always done in the closest way possible. When talking about the longitude, usually there are 2 ways of making the join: towards west or towards east. This library selects the closest one or, in case of a tie, towards east.

Places

There is a list of geographical points, lines and areas into the Place enum.

Through the get() method you can retrieve the underlying LatLng, LatLngAltitude or LatLngBounds object that represents it.

Each of them can be used as any other LatLng, LatLngAltitude or LatLngBounds object.

Utils

Latitude and Longitude

These classes facilitate converting between degrees and meters or kilometers in both directions.

This is especially useful in the case of longitudes, because the ratio changes depending on the latitude.

FloatCompare

Testing floating point values for equality is problematic, due to the way that they are represented internally. To test floating point values for equality, an upper bound on the relative error due to rounding is used. This delta is the smallest acceptable difference in calculations.

The methods implemented into the FloatCompare class allow comparing float numbers due to an internal delta value.


📚 The full API of this library is available in this file.


Coordinates for PHP was created by Paul Albandoz under the MIT license.


All versions of coordinates with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3.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 powlam/coordinates contains the following files

Loading the files please wait ....