ginocampra/laravel-leaflet 问题修复 & 功能扩展

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

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

ginocampra/laravel-leaflet

Composer 安装命令:

composer require ginocampra/laravel-leaflet

包简介

Allows you to create pages with Leaflet maps in an integrated way with Laravel

README 文档

README

Laravel 7|8|9|10 Latest Stable Version Total Downloads License

Allows you to create pages with Leaflet maps in an integrated way with Laravel.

How to Install:

Install a basic Laravel Project.

composer create-project laravel/laravel:^8.0 example-app
 
cd example-app

Run this command to install the package and configure the Laravel Project

composer require ginocampra/laravel-leaflet

Run the server

php artisan serve

Open you browser "http://127.0.0.1:8000/map"

You will see:

LaravelLeaflet

Blade Component

You can use this to inject a Leaflet Map in you Blade views

Implement $title and $markers in your Controller and pass to view

    $options = [
        'center' => [
            'lat' => -23.347509137997484,
            'lng' => -47.84753617004771
        ],
        'googleview' => true,
        'zoom' => 18,
        'zoomControl' => true,
        'minZoom' => 13,
        'maxZoom' => 18,
        'width' => '100%', // optional default = 100%
        'height' => '600px',  // optional default = 600px
    ];
    $initialMarkers = [
        [
            'position' => [
                'lat' => -23.347509137997484,
                'lng' => -47.84753617004771
            ],
                'draggable' => false,
                'title' => 'Tatuí - SP',
                'name' => 'Marco Zero'    // optional
            ]
        ];
    $initialPolygons = [
        [
            'name' => 'Quadrilátero A',  // optional
            [-23.34606370264136 , -47.84818410873414],
            [-23.34575341324051 , -47.84759938716888],
            [-23.34615728184211 , -47.84729361534119],
            [-23.34651189716213 , -47.84792125225068]
        ]
    ];
    $initialPolylines = [
            [
                'name' => 'Rota Principal',  // optional
                [-23.348914298657980 , -47.850147485733040],
                [-23.347850469110245 , -47.848109006881714],
                [-23.349209805352476 , -47.847293615341194],
                [-23.347781516900888 , -47.844675779342660]               
            ]
    ];
    $initialRectangles = [
        [
            'name' => 'Área de Interesse',  // optional
            [-23.347683013682527 , -47.85067319869996],
            [-23.346727528670904 , -47.84879565238953]
        ]
    ];
    $initialCircles = [
        [
            'position' => [ 
                'lat' => -23.346569922234977, 
                'lng' => -47.84376382827759
            ],
            'radius' => 80.68230575309364,
            'name' => 'Raio de Cobertura'  // optional
        ]
    ];
    $title = 'Initial Map';
    
    return view('welcome',compact('options','title','initialMarkers','initialPolygons','initialPolylines','initialRectangles','initialCircles'));

Drop the blade component in the view

        <div>
            <x-laravel-map :title="$title" :initialMarkers="$initialMarkers" :initialPolygons="$initialPolygons" :initialPolylines="$initialPolylines" :initialRectangles="$initialRectangles" :initialCircles="$initialCircles" :options="$options"/>
        </div>

License

The MIT License (MIT). Please see License File for more information.

ginocampra/laravel-leaflet 适用场景与选型建议

ginocampra/laravel-leaflet 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 1.79k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 09 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 ginocampra/laravel-leaflet 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-05