承接 ronanguilloux/geocodertoolkit 相关项目开发

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

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

ronanguilloux/geocodertoolkit

Composer 安装命令:

composer require ronanguilloux/geocodertoolkit

包简介

Geo-related utils & toolkit PHP library, build atop the Geocoder lib

README 文档

README

GeocoderToolkit is a geo-related utils & toolkit PHP library, build atop the Geocoder library

It provides simple tools such as

  • distant geopoints coordinates calculation (bounding box angles, etc.)
  • other geo-related tools to come (all contributors will be fully credited!)

Build Status

Installation

GeocoderToolkit is not a stand-alone library: it assumes strong dependency with the Geocoder PHP library.

The recommended way to install Geocoder is through composer.

Just create a composer.json file for your project:

{
     "require": {
        "php": ">=5.3.0",
        "willdurand/geocoder": "master-dev",
        "ronanguilloux/geocodertoolkit": "master-dev"
    }
}

And run these two commands to install it:

$ wget http://getcomposer.org/composer.phar
$ php composer.phar install

Now you can add the autoloader, and you will have access to the library:

<?php

require 'vendor/autoload.php';

If you don't use neither Composer nor a ClassLoader in your application, just require the provided autoloader:

<?php

require_once 'src/autoload.php';

Usage

Here is an example of how to determine a new geopoint, 500 kilometers away from an origin, in the north-east direction:

<?php

$origin = new Geocoded();
$origin->fromArray(array('latitude'=>'47.218371', 'longitude'=>'-1.553621')); // Nantes, Loire valley, France
$geometry = new BoundingBoxGeometry();
// 45 = bearing angle, 500 = distance, 'kilometer' is default, but miles are OK
$northEast = $geometry->getAngle($origin, 45, 500); // a new geocoded resource

API

You can provide your own geometry tool, you just need to create a new class which implements GeometryInterface.

Unit Tests

To run unit tests, you'll need cURL and a set of dependencies you can install using Composer:

$ php composer.phar install --dev

Once installed, just launch the following command:

$ phpunit

Credits

License

GeocoderToolkit is released under the MIT License. See the bundled LICENSE file for details. You can find a copy of this software here: https://github.com/ronanguilloux/GeocoderToolkit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固