承接 black/geo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

black/geo

Composer 安装命令:

composer require black/geo

包简介

PHP 5.4+ library to make working with Geo coordinates safer, easier, and fun

README 文档

README

PHP 5.4+ library to make working with Geo coordinates safer, easier, and fun!

SensioLabsInsight Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads

Installation

The recommended way to install Geo is through Composer:

{
    "require": {
        "black/geo": "@stable"
    }
}

Protip: You should browse the [black/geo](https://packagist.org/packages/black/geo page to choose a stable version to use, avoid the @stable meta constraint.

Usage

Usage of this class is simple. First, Geo coordinates are based on three values : latitude, longitude and elevation. Elevation is not required and initialised to 0 if arguments are not provided.

There are three ways to create a Geo object:

$geo = new Geo\Coordinates(37.42242, -122.08585, 0);
$geo->getCoordinates(); // will return "37.42242,-122.08585,0"
Geo\Coordinates::fromCoordinatesAsString("37.42242,-122.08585,0")
    ->getLatitude(); // will return "37.42242"
Geo\Coordinates::fromCoordinatesAsArray([37.42242, -122.08585, 0])
    ->getCoordinates(); // will return "37.42242,-122.08585,0"

Getter

List of available getters:

  • getLatitude()
  • getLongitude()
  • getElevation()
  • getCoordinates()
  • getCoordinatesAsArray()

Check if two geo are equals

  • isEqualTo(Geo $geo)

Exception

If you want to pass 1 or less OR 4 or more arguments, a Geo\Exception\InvalidCoordinatesException() will be thrown.

License

Geo is released under the MIT License. See the bundled LICENSE file for details.

Contributing

See CONTRIBUTING file.

Credits

This README is heavily inspired by Geocoder library by the great @willdurand. This guy needs your PR for the sake of the REST in PHP.

Alexandre "pocky" Balmes alexandre@lablackroom.com. Send me Flattrs if you love my work, buy me gift or hire me!

统计信息

  • 总下载量: 56
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固