维尔里斯蒂/cmb2-field-leaflet-geocoder

CMB2的Leaflet(带有Geocoder)字段类型。

安装: 545

依赖: 0

建议者: 0

安全: 0

星级: 8

关注者: 4

分支: 8

开放性问题: 4

语言:JavaScript

类型:wordpress插件

0.1.3 2017-01-10 21:48 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:25:27 UTC


README

CMB2提供的Leaflet(带有Geocoder)字段类型。

Build Status

安装

Composer

composer require villeristi/cmb2-field-leaflet-geocoder

手动

  1. 下载插件
  2. 将插件文件夹放置在您的/wp-content/plugins/目录中
  3. 在插件仪表板中激活插件

用法

array(
  'id' => $prefix . 'location',
  'name' => __('Coordinates'),
  'desc' => __('Drag the marker after finding the right spot to set the exact coordinates'),
  'type' => 'leaflet_map',
  /*
  For these extra attributes, please consult Leaflet [documentation](https://leaflet.npmjs.net.cn/reference-1.0.0.html)
  'attributes' = array(
    'tilelayer'           => 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
    'searchbox_position'  => 'topright'; // topright, bottomright, topleft, bottomleft,
    'search'              => __( 'Search...' ),
    'not_found'           => __( 'Not found' ),
    'initial_coordinates' => [
        'lat' => 61.9241, // Go Finland!
        'lng' => 25.7482  // Go Finland!
    ],
    'initial_zoom'        => 4 // Zoomlevel when there's no coordinates set,
    'default_zoom'        => 8 // Zoomlevel after the coordinates have been set & page saved
  )
  */
),