pixelastronauts/statamic-autocomplete-address-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pixelastronauts/statamic-autocomplete-address-field

Composer 安装命令:

composer require pixelastronauts/statamic-autocomplete-address-field

包简介

A Statamic Address Field addon with Google Maps Autocomplete

README 文档

README

The Statamic Autocomplete Address Field is a powerful addon for Statamic CMS that integrates a straightforward yet highly effective address input field featuring Google Maps Autocomplete. This tool simplifies the process of entering and storing comprehensive address data directly within your CMS.

Key Features

  • Google Maps Autocomplete: Enhances text input fields with autocomplete functionality for addresses, leveraging Google Maps.
  • Updated Places API: Uses the new Google Maps Place class API (when available) for improved performance and modern features.
  • Comprehensive Data Storage: Automatically stores detailed address information along with geographical coordinates. Example data structure includes:
    • street_number: e.g., "42A"
    • route: e.g., "Prinsestraat"
    • locality: e.g., "Den Haag"
    • administrative_area_level_1: e.g., "Zuid-Holland"
    • country: e.g., "Nederland"
    • postal_code: e.g., "2513 CE"
    • formatted_address: e.g., "Prinsestraat 42A, 2513 CE Den Haag, Nederland"
    • coordinates:
      • lat: 52.0787948
      • lng: 4.305637
  • Configurable Options: Allows for country-specific configuration in the fieldset settings.

Installation

To install the Statamic Address Field, you can either use the Statamic control panel or a command line interface:

  • Via Control Panel: Navigate to Tools > Addons in the Statamic control panel, search for "Address Field", and click Install.
  • Via Command Line:
    composer require pixelastronauts/statamic-autocomplete-address-field

Usage

To utilize the Address Field addon:

  1. API Key Setup: Ensure that your 'GOOGLE_PLACES_API_KEY' is added to your project's .env file and properly restricted. Make sure you have the new Places API (New) enabled in your Google Cloud project.
  2. Field Configuration: Configure the desired country and other settings in your fieldset configuration file as needed.
  3. Integration: Add the Address Field to your relevant templates or blueprints within Statamic, and it will automatically incorporate Google Maps Autocomplete functionality.

Google Maps API Updates

This addon supports both the legacy Places API and the new Place class API. The implementation will automatically use the new API if available, with a fallback to the legacy API.

Key Benefits of the New Place API:

  • Improved performance
  • Modern Promise-based async interface
  • Updated data field structure using camelCase conventions
  • Expanded place types and data fields

Migration Notes:

  • Enable "Places API (New)" in your Google Cloud project
  • The addon handles backward compatibility automatically
  • No changes needed for existing templates or content

This addon significantly streamlines address entry and enhances data accuracy.

pixelastronauts/statamic-autocomplete-address-field 适用场景与选型建议

pixelastronauts/statamic-autocomplete-address-field 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 2.58k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 06 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-18