2017 © Pedro Peláez
 

yii2-extension yii2-yandex-map

Yandex map widget for Yii2

image

stalkerrr/yii2-yandex-map

Yandex map widget for Yii2

  • Wednesday, October 25, 2017
  • by stalkerrr
  • Repository
  • 0 Watchers
  • 0 Stars
  • 39 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 11 % Grown

The README.md

Yii2 Yandex Maps Widget

Supports Markers and Clusters now., (*1)

Install

Either run, (*2)

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

or add, (*3)

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

to the require section of your composer.json file., (*4)

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, (*5)

The Versions

25/10 2017

dev-master

9999999-dev https://bitbucket.org/stalkerrr/yii2-yandex-map

Yandex map widget for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 yii 2 yandex yandex api yandex map yandex map markers yandex map cluster

25/10 2017

0.11

0.11.0.0 https://bitbucket.org/stalkerrr/yii2-yandex-map

Yandex map widget for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 yii 2 yandex yandex api yandex map yandex map markers yandex map cluster

25/10 2017

0.1

0.1.0.0 https://bitbucket.org/stalkerrr/yii2-yandex-map

Yandex map widget for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 yii 2 yandex yandex api yandex map yandex map markers yandex map cluster