2017 © Pedro Peláez
 

yii2-extension yii2-static-map

Extension for generating static maps (for example for contacts page). Now supports google map and openstreet map

image

codru/yii2-static-map

Extension for generating static maps (for example for contacts page). Now supports google map and openstreet map

  • Monday, February 1, 2016
  • by codru
  • Repository
  • 1 Watchers
  • 2 Stars
  • 179 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Yii2 Static Map

Extension for generating static maps (for example for contacts page). Now support google map and openstreet map, (*1)

Build Status Scrutinizer Code Quality, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist codru/yii2-static-map "*"

or add, (*5)

"codru/yii2-static-map": "*"

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

Usage

Once the extension is installed, simply use it in your code by :, (*7)

<?= \codru\staticmap\StaticMap::widget(
        [
            'map' => [
                'class' => \codru\staticmap\types\Google::className(),
                'options' => [
                    'center' => '40,50',
                    'zoom' => '13',
                    'size' => '640x100',
                    'scale' => '2',
                    'language' => Yii::$app->language,
                    'markers' => [
                        'size' => 'tiny',
                        '40,50',
                    ],
                ],
            ],
        ]
) ?>

Or, (*8)

<?= \codru\staticmap\StaticMap::widget(
        [
            'map' => [
                'class' => \codru\staticmap\types\OpenStreet::className(),
                'options' => [
                    'center' => '40,50',
                    'zoom' => '15',
                    'size' => '1024x200',
                    'language' => Yii::$app->language,
                    'markers' => [
                        '40,50',
                        'ol-marker',
                    ],
                ],
            ],
        ]
) ?>

The Versions

01/02 2016

dev-master

9999999-dev

Extension for generating static maps (for example for contacts page). Now supports google map and openstreet map

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Vasiliev

yii2 google maps static map openstreet map