承接 stalkerrr/yii2-yandex-map 相关项目开发

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

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

stalkerrr/yii2-yandex-map

最新稳定版本:0.11

Composer 安装命令:

composer require stalkerrr/yii2-yandex-map

包简介

Yandex map widget for Yii2

README 文档

README

Supports Markers and Clusters now.

Install

Either run

$ php composer.phar require stalkerrr/yii2-yandex-map "*"

or add

"stalkerrr/yii2-yandex-map": "*"

to the `require` section of your composer.json file.

Usage

How to call?

	// add this in your view
	
	use stalkerrr\yandex_map\YandexMapWidget;
	use stalkerrr\yandex_map\YandexPreset;
	use stalkerrr\yandex_map\YandexMapCluster;
	
	
	//create preset object with params of geoMarker (like color, type and other)
	$testPreset = new YandexPreset();
	$testPreset->type = YandexPreset::TYPE_DOT;
    $testPreset->color = YandexPreset::COLOR_DARK_ORANGE;
    //$testPreset->icon = YandexPreset::ICON_MONEY;
    $testPreset->circle = true;
	
	//simple way calling
	$mapWidget = YandexMapWidget::widget(
		[
			'points' => [
        		['coord' => [53.21, 32.34], 'content' => [], 'opts' => ['preset' => $testPreset]],
        		['coord' => [54.21, 30.34]]
			]
        ]
    );

Creating clusters or collections dynamically

	$testPreset = new YandexPreset();
	$testPreset->type = YandexPreset::TYPE_DOT;
	$testPreset->color = YandexPreset::COLOR_DARK_ORANGE;
	$testPreset->circle = true;

    $widget = YandexMapWidget::begin(
        ['points' => [
            ['coord' => [53.21, 32.34], 'content' => [], 'opts' => ['preset' => $testPreset]],
            ['coord' => [54.21, 30.34]]]
        ]
    );
    $cluster = new YandexMapCluster();
    $cluster->preset = $testPreset;

    $testPreset->color=YandexPreset::COLOR_BLACK;
    $widget->addCluster(
        [
            ['coord' => [43.21, 31.34],'content' => [], 'opts' => ['preset' => $testPreset]],
            ['coord' => [45.31, 31.34]]
        ],
        $cluster
     );


	$widget->addCollection([['coord' => [32.25, 21.54]], ['coord' => [40.21, 39.14]]], $testPreset);
    
    YandexMapWidget::end();
	

Built With

Authors

  • David Khachatryan - Initial work - stalkerrr

License

This project is licensed under the MIT License - see the LICENSE.md file for details

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-10-23