定制 jflight/nearby-uk-postcode-finder 二次开发

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

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

jflight/nearby-uk-postcode-finder

Composer 安装命令:

composer require jflight/nearby-uk-postcode-finder

包简介

Find all UK Ppostcodes within the radius of a postcode

README 文档

README

The postcode finder takes a UK postcode outcode (the bit before the space) and a radius, and returns all other uk postcodes within that radius.

It is powered by a csv file of postcodes and their longitude and latitude coordinates, and shouldn't be used in production environments where speed is important. The project makes use of the excellent Geotools library.

Installation

Add to composer.json:

    "require": {
        "jflight/nearby-uk-postcode-finder": "dev-master"
    }

Run:

composer update

Usage

Create a postcode:

$postcode = new Jflight\PostcodeFinder\UkPostcode('CF11');

Get postcodes within a radius of 10 km:

$nearbyPostcodes = $postcode->findNearestPostcodes(10)); // Array of postcodes

Extension

In theory, the postcode class could be extended and used for postcodes (or equivalent) for any county, as long as csv lookup of postcodes with their longitude and latitue is available.

This would be done as follows:

<?php

class NewPostcode extends Jflight\PostcodeFinder\Postcode {
    protected $file = "/path/to/csv.csv";
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-07-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固