定制 graychen/geolocation 二次开发

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

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

graychen/geolocation

Composer 安装命令:

composer require graychen/geolocation

包简介

Get the geographic location based on latitude and longitude

README 文档

README

composer包 根据经纬度得到地理位置信息,暂时还只有baidu地图api接口

this is a library for find address by geolocation

Latest Stable Version Total Downloads License StyleCI Build Status Scrutinizer Code Quality Code Coverage Build Status

how to use

<?php
namespace graychen\Tests;

use PHPUnit\Framework\TestCase;
use graychen\geolocation\BaiduGeolocation;

class BaiduGeolocationTest extends TestCase
{
    private $geolocation;

    public function setUp()
    {
        $this->geolocation=new BaiduGeolocation();
    }

    /**
     * Asserts that the container can set and get a simple closure with args.
     */
    public function testGetgeolocation()
    {
        $this->geolocation->latitude= "your latitude";
        $this->geolocation->longitude= "your longitude";
        $this->geolocation->ak= "your ak";
        $json_content=$this->geolocation->getGeolocation();
        $province=$json_content["result"]["addressComponent"]["province"];
        $this->assertEquals("江苏省", $province);
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固