承接 mattrothenberg/statamic-mapbox-address 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mattrothenberg/statamic-mapbox-address

最新稳定版本:0.9.0

Composer 安装命令:

composer require mattrothenberg/statamic-mapbox-address

包简介

A Mapbox autocomplete dropdown fieldtype for the Statamic Control Panel

README 文档

README

An address Autocomplete Field for Statamic V3, powered by Mapbox.

Cover Image

Installation

Add the addon to your project via composer.

composer require mattrothenberg/statamic-mapbox-address

Make sure to add the following environment variable, since this library uses Mapbox under the hood for address autocompletion. The addon will not work without a valid key.

MAPBOX_API_KEY=""

Configuration

Currently, only a few configuration options are supported, although Mapbox's forward geocoding API exposes a variety of settings..

  • placeholder (string>): Placeholder text for the rendered picker.
  • countries (Array<string>): Limits results to the specified countries. Each item in the array should be an ISO 3166 alpha 2 country code.
  • featureTypes ("country" | "region" | "postcode" | "district" | "place" | "locality" | "neighborhood" | "address" | "poi" | "poi.landmark"):: Filter results by feature types
  • language (Array<string>): Specify the language to use for response text and, for forward geocoding, query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script.

Screen Shot 2021-03-15 at 7 45 53 AM

Please feel free to submit a pull request if you'd like to add other settings to the configuration screen.

Serialization

When selecting an address from the picker, the entire result will be serialized on your entry. The structure of a result is as follows:

address:
  id: address.8556990516457510
  type: Feature
  place_type:
    - address
  relevance: 0.90963
  properties:
    accuracy: rooftop
  text: "Pennsylvania Avenue NW"
  place_name: "1600 Pennsylvania Avenue NW, Washington, District of Columbia 20500, United States"
  matching_place_name: "1600 Pennsylvania Avenue NW, Washington, DC 20500, United States"
  center:
    - -77.036547
    - 38.897675
  geometry:
    type: Point
    coordinates:
      - -77.036547
      - 38.897675
  address: "1600"
  context:
    - id: neighborhood.291451
      text: Downtown
    - id: postcode.8556990516457510
      text: "20500"
    - id: place.12583600763246050
      wikidata: Q61
      text: Washington
    - id: region.14064402149979320
      wikidata: Q3551781
      short_code: US-DC
      text: "District of Columbia"
    - id: country.19678805456372290
      wikidata: Q30
      short_code: us
      text: "United States"

Please feel free to submit a pull request if you'd like to modify or improve this very basic serialization schema.

mattrothenberg/statamic-mapbox-address 适用场景与选型建议

mattrothenberg/statamic-mapbox-address 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.92k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2021 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mattrothenberg/statamic-mapbox-address 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mattrothenberg/statamic-mapbox-address 我们能提供哪些服务?
定制开发 / 二次开发

基于 mattrothenberg/statamic-mapbox-address 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-15