定制 spacedealer/yii2-here 二次开发

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

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

spacedealer/yii2-here

最新稳定版本:0.1.0

Composer 安装命令:

composer require spacedealer/yii2-here

包简介

Yii2 extension here.com REST api

README 文档

README

Attention: Please do not use in production environments. It‘s WIP.

This is a Here APIs client extension for the Yii2 Framework. It wraps around the here-api php library.

Please see here-api php library readme for currently supported APIs.

Build Status SensioLabsInsight Dependency Status

Requirements

  • php >= 5.4
  • spacedealer/here-api 0.1

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist spacedealer/yii2-here "*"

or add

"spacedealer/yii2-here": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply modify your application components configuration as follows:

'here' => [
	'class' => 'spacedealer\here\Here',
	'appCode' => 'your_app_code',
	'appId' => 'your_app_id',
],

Use within your Yii2 application logic:

$geocoder = \Yii::$app->get('here')->getGeoCoder();
$response = $geocoder->geocode([
   'city' => 'Berlin',
   'postalCode' => '10997',
   'street' => 'Schlessische Str.',
   'housenumber' => '28',
]);
$displayPosition = $response->getPath('Response/View/0/Result/0/Location/DisplayPosition');

Resources

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-12-03