定制 51degrees/fiftyone.geolocation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

51degrees/fiftyone.geolocation

Composer 安装命令:

composer require 51degrees/fiftyone.geolocation

包简介

Geolocation engines for 51Degrees Pipeline API. Perform reverse geocoding using longitude and latitude to populate postal addresses.

README 文档

README

51Degrees Pipeline API

Developer Documentation

Introduction

This repository contains the geo-location engines for the PHP implementation of the Pipeline API.

Pre-requesites

The Pipeline engines are written in PHP and target 5 and 7.

Packages

  • geoLocation - A Node.js engine which retrieves geo-location results by consuming data from the 51Degrees cloud service.
  • geoLocationPipelineBuilder - Contains the geo-location engine builders.

Installation

You can either reference the projects in this repository or you can reference the Composer packages in your project:

"require": {
    "51degrees/fiftyone.geolocation": "@dev",
    ...

Make sure to select the latest version from Composer.

Configuration Options

  • String type - The name of the type of geolocation service to use.
  • String resourceKey - Resource Key is evidence used within the Cloud service for monitoring usage. Obtain a resource key.
  • Array restrictedProperties - The properties to populate values for in the result (all are populated by default).

Examples

Examples can be found in the examples folder. See below for a list of examples.

Example Description Implemtation
gettingstarted.php This example uses geo-location to determine the country from a longitude and latitude. Cloud
configurefromfile.php This examples creates a pipeline from a configuration file to set up geo-location. Cloud
combiningservices.php This example uses geo-location alongside device detection to determine the country and device. Cloud
webIntegration.php This example demonstrates how to integrate the geo-location solution into a website. Cloud

Ensure the resource_key environment variable is set to your resource key prior to running the example scripts.

To run the examples, go to the examples directory and run:

php -S localhost:8080

The examples will now be available to view in a browser. For example, the cloud getting started example will be available by browsing to localhost:8080/cloud/gettingstarted.php.

Tests

In this repository, there are tests using phpunit. You will need to install the package dependencies to run them:

composer install

To run the tests, then call:

phpunit --fail-on-warning --display-warnings --log-junit test-results.xml

Project documentation

For complete documentation on the Pipeline API and associated engines, see the 51Degrees documentation site.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: EUPL-1.2
  • 更新时间: 2020-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固