承接 imumz/nova-4-field-map 相关项目开发

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

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

imumz/nova-4-field-map

最新稳定版本:v1.0.4

Composer 安装命令:

composer require imumz/nova-4-field-map

包简介

A Laravel Nova field.

README 文档

README

GitHub release (latest by date) Packagist

Nova4FieldMap

Custom Laravel Nova 4 map detail field using Leaflet. Supports Google Maps, marker clustering, map height, latitude and longitude coordinates, GeoJSON, marker popup and custom marker icons.

image

Installation

composer require imumz/nova-4-field-map

Usage

use Imumz\Nova4FieldMap\Nova4FieldMap
...
Nova4FieldMap::make()

Available Methods

Height

Nova4FieldMap::make()
->height('400px') // default is 300px

Google Maps

By default the provider is OpenStreetMaps.
You must set your Google Maps API key (https://developers.google.com/maps/documentation/javascript/get-api-key).

Nova4FieldMap::make()
->googleApiKey('')
->googleMapType('roadmap'), // roadmap, satellite or hybrid

Latitude / Longitude (Point)

Nova4FieldMap::make('')
->type('LatLon')
->point($this->my_latitude,$this->my_longitude)

GeoJSON

Nova4FieldMap::make()
->type('GeoJson')
->geoJson('')

GeoJson Example

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "popup": "I am a Popup"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          23.8623046875,
          -30.221101852485987
        ]
      }
    }
  ]
}

Popup

Nova4FieldMap::make()
->popup('popup')

Custom Marker Icon

Nova4FieldMap::make()
->markerIcon('/images/marker-icon.png')

You can pass additional parameters to set the icon size and anchor

->markerIcon('/images/marker-icon.png',[100,100],[50,50])

image

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-24