承接 takashato/nova-map-marker-field 相关项目开发

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

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

takashato/nova-map-marker-field

最新稳定版本:v0.0.2-alpha

Composer 安装命令:

composer require takashato/nova-map-marker-field

包简介

A package for adding a map marker using Mapbox to Laravel Nova

README 文档

README

This package allows adding fields with Mapbox, to select a location (by long - latitude).

This package is still under development, it is basicually functioning but not guaranted working perfectly or match multiple use cases

Prerequisite

This field requires attributes using the package MatanYadaev/laravel-eloquent-spatial

  • Nova ^4.x.x
  • Laravel 8+ (due to the dependencies of MatanYadaev/laravel-eloquent-spatial:2.x.x

Installation

  1. Composer package install
composer require takashato/nova-map-marker-field
  1. Put this to your configs/services.php
<?php
return [
  'mapbox' => [
    'public_token' => env('MAPBOX_PUBLIC_TOKEN'),
  ],
];
  1. Put your public access token of Mapbox to the .env file
MAPBOX_PUBLIC_TOKEN=<your_public_token>

The token is obtained from Mapbox Dashboard. Mapbox is free for 50k requests / mo but requires credit card for registration. You should consider for this.

Usage

NovaMapMarkerField::make(__('Field label'), 'attribute_name')
  ->hideFromIndex()
  ->zoom($zoomValue),
  • $zoomValue default zoom value of Mapbox (= 10 if empty)
  • attribute_name the attribute of current resource / model This attribute must implement an Point object by the package MatanYadaev/laravel-eloquent-spatial

Authors

  • me
  • (and may be you xD)

Contribution

Feel free to made PR or put an issue for this package. I will see for them when having free time xD

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-11