2017 © Pedro Peláez
 

yii2-extension yii2-gmapmarker

A simple google map marker widget for Yii2

image

meysampg/yii2-gmapmarker

A simple google map marker widget for Yii2

  • Sunday, July 17, 2016
  • by meysampg
  • Repository
  • 1 Watchers
  • 2 Stars
  • 864 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 19 % Grown

The README.md

Yii2 Google Map Marker

🟥⚠️ THIS PACKAGE IS ABANDONED. PLEASE SELECT ANOTHER PACKAGE OR FORK THIS REPOSITORY AND INFORM ME ON p.g.meysam [at] Gmail [dot] com TO REFER TO YOUR PACKAGE IN PACKAGIST ⚠️🟥, (*1)

A simple google map marker widget for Yii2, (*2)

Installation

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

Either run, (*4)

composer require meysampg/yii2-gmapmarker "*"

or add, (*5)

"meysampg/yii2-gmapmarker": "*"

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

Config

Easily you can set the asset needed values with as mentioned on http://www.yiiframework.com/doc-2.0/guide-structure-assets.html#customizing-asset-bundles. For example You can use this code on you web.config:, (*7)

return [
    // Some codes are here :)
    'components' => [
        // And also maybe here ;)
        'assetManager' => [
            'bundles' => [
                'meysampg\gmap\GMapAsset' => [
                    'key' => 'YOU_API_KEY',
                    'language' => 'en'
                ],
            ],
        ],
    ],
];

Usage

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

<?= GMapMarker::widget([
    'width' => '98', // Using pure number for 98% of width.
    'height' => '400px', // Or use number with unit (In this case 400px for height).
    'marks' => [35.6892, 51.3890],
    'zoom' => 5,
    'disableDefaultUI' => true
]); ?>

for single marker or use for multiple markers by:, (*9)

<?= GMapMarker::widget([
    'width' => '600px',
    'height' => '400px',
    'marks' => [
        [35.6892, 51.3890],
        [31.3183, 48.6706],
        [29.4850, 57.6439]
    ],
    'zoom' => 5,
    'disableDefaultUI' => true
]); ?>

Screenshot

Yii2 Google Map Marker Extension, (*10)

ToDo

  • Add support of label to makers.
  • Add ability of showing custom icon instead of default marker.
  • [Need more? Open an issue!]

The Versions

17/07 2016

dev-master

9999999-dev

A simple google map marker widget for Yii2

  Sources   Download

MIT

The Requires

 

by Meysam P.G.

extension yii2 google google-map

17/07 2016

v1.0.0

1.0.0.0

A simple google map marker widget for Yii2

  Sources   Download

MIT

The Requires

 

by Meysam P.G.

extension yii2 google google-map