定制 yii2mod/yii2-google-maps-markers 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

yii2mod/yii2-google-maps-markers

最新稳定版本:1.4

Composer 安装命令:

composer require yii2mod/yii2-google-maps-markers

包简介

Google Maps Markers displays a set of user addresses as markers on the map.

README 文档

README

Google Maps Markers Widget for Yii2


GoogleMaps Widget displays a set of user addresses as markers on the map.

Latest Stable Version Total Downloads License Build Status

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require yii2mod/yii2-google-maps-markers "*"

or add

"yii2mod/yii2-google-maps-markers": "*"

to the require section of your composer.json.

Usage

To use GoogleMaps, you need to configure its [[userLocations]] property. For example:

echo yii2mod\google\maps\markers\GoogleMaps::widget([
    'userLocations' => [
        [
            'location' => [
                'address' => 'Kharkiv',
                'country' => 'Ukraine',
            ],
            'htmlContent' => '<h1>Kharkiv</h1>',
        ],
        [
            'location' => [
                'city' => 'New York',
                'country' => 'United States',
            ],
            'htmlContent' => '<h1>New York</h1>',
        ],
    ],
]);

Configuration

To configure the Google Maps key or other options like language, version, library, or map options:

echo yii2mod\google\maps\markers\GoogleMaps::widget([
    'userLocations' => [...],
    'googleMapsUrlOptions' => [
        'key' => 'this_is_my_key',
        'language' => 'id',
        'version' => '3.1.18',
    ],
    'googleMapsOptions' => [
        'mapTypeId' => 'roadmap',
        'tilt' => 45,
        'zoom' => 5,
    ],
]);

OR via yii params configuration. For example:

'params' => [
    'googleMapsUrlOptions' => [
        'key' => 'this_is_my_key',
        'language' => 'id',
        'version' => '3.1.18',
     ],
    'googleMapsOptions' => [
        'mapTypeId' => 'roadmap',
        'tilt' => 45,
        'zoom' => 10,
    ],
],

To get key, please visit page

Google Maps Options

You can find them on the options page

Example

Alt text

统计信息

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

GitHub 信息

  • Stars: 18
  • Watchers: 4
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-29