定制 rinat-gizatullin/fkr-nominatim-bundle 二次开发

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

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

rinat-gizatullin/fkr-nominatim-bundle

Composer 安装命令:

composer require rinat-gizatullin/fkr-nominatim-bundle

包简介

Integrates nominatim api (Geolocation API based on OpenStreetMap) into Symfony2

README 文档

README

Integrates nominatim api (Geolocation API based on OpenStreetMap) into Symfony2.

What you need

curl must be enabled on your server.

Installation

Bring in the vendor library

This can be done in three different ways:

Method #1) Use composer

"require": {
    "fkr/nominatim-bundle": "*"
}

Method #2) Use git submodules

git submodule add git://github.com/fkrauthan/FkrNominatimBundle.git vendor/bundles/Fkr/NominatimBundle

Method #3) Use deps file

[FkrNominatimBundle]
    git=git://github.com/fkrauthan/FkrNominatimBundle.git
	target=bundles/Fkr/NominatimBundle

Register the Fkr namespace

// app/autoload.php
$loader->registerNamespaces(array(
    'Fkr' => __DIR__.'/../vendor/bundles',
    // your other namespaces
));

Add FkrNominatimBundle to your application kernel

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Fkr\NominatimBundle\FkrNominatimBundle(),
        // ...
    );
}

Configuration

# app/config.yml
fkr_nominatim:
    app_name:
    app_mail:
  • app_name: You must set your app name here (It's needed for OpenStreetMap API)
  • app_mail: You should set your mail here (It's needed that OpenStreetMap can contact you if any errors occours by using there API)

Usage

To get a GeolocationApi class instance just use the following code

$this->get('fkr_nominatim.geolocation_api')->locateAddress('My Street, 8888 MyCity');
$this->get('fkr_nominatim.geolocation_api')->locateAddress(array('My Street', '8888', 'MyCity'));

The result would be:

  • null: If nothing was found
  • Location object: If only one result was found
  • array with Location objects: If more then one result was found

Licence

Resources/meta/LICENSE

Nominatim usage policy

Please respect the usage policy specified by Open Street Map for use of the Geocoding API.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固