2017 © Pedro Peláez
 

yii2-extension yii2-marker-clusterer

Yii2 assets and marker clusterer

image

edofre/yii2-marker-clusterer

Yii2 assets and marker clusterer

  • Monday, February 13, 2017
  • by edofre
  • Repository
  • 3 Watchers
  • 1 Stars
  • 4,159 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Yii2 marker-clusterer widget

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*1)

Installation

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

To install, either run, (*3)

$ php composer.phar require edofre/yii2-marker-clusterer

or add, (*4)

"edofre/yii2-marker-clusterer": "v1.0.1"

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

Usage

MarkerClusterer extension to be used in co-operation with 2amigos/yii2-google-maps-library, (*6)

Below you will find a full example of a view file that uses the clusterer, (*7)

title = 'Maps Clusterer';
?>


new LatLng(['lat' => 52.1326, 'lng' => 5.2913]), // Center of Netherlands 'zoom' => 7, ]); $cities = [ 'Utrecht' => new LatLng(['lat' => 52.0841659, 'lng' => 5.0124518]), 'Groningen' => new LatLng(['lat' => 53.2216845, 'lng' => 6.4947123]), 'Amsterdam' => new LatLng(['lat' => 52.3745291, 'lng' => 4.7585311]), 'Amstelveen' => new LatLng(['lat' => 52.2861961, 'lng' => 4.7820703]), 'Hilversum' => new LatLng(['lat' => 52.2315507, 'lng' => 5.0905084]), 'Ede' => new LatLng(['lat' => 52.052436, 'lng' => 5.6301072]), 'Amersfoort' => new LatLng(['lat' => 52.1589302, 'lng' => 5.3077834]), 'Zwolle' => new LatLng(['lat' => 52.514148, 'lng' => 5.9669147]), 'Leiden' => new LatLng(['lat' => 52.1517316, 'lng' => 4.4466504]), 'Rotterdam' => new LatLng(['lat' => 51.9279514, 'lng' => 4.4203666]), 'The Hague' => new LatLng(['lat' => 52.0716334, 'lng' => 4.2398287]), 'Delft' => new LatLng(['lat' => 51.9995297, 'lng' => 4.3286785]), 'Eindhoven' => new LatLng(['lat' => 51.4455368, 'lng' => 5.3814706]), ]; foreach ($cities as $city => $lat_lng) { $marker = new Marker([ 'position' => $lat_lng, 'title' => $city, 'clickable' => true, ]); $marker->attachInfoWindow(new InfoWindow(['content' => "{$city}"])); $map->addOverlay($marker); } $map->center = $map->getMarkersCenterCoordinates(); $map->zoom = $map->getMarkersFittingZoom() - 1; ?>
= $map->display(); ?>

Make sure to add the google maps key to your assetManager, (*8)

'assetManager' => [
    'bundles' => [
        'dosamigos\google\maps\MapAsset' => [
            'options' => [
                'key'      => 'XYZ',
                'language' => 'nl',
                'version'  => '3.1.18',
            ],
        ],
    ],
],

The Versions

13/02 2017

dev-master

9999999-dev https://github.com/edofre/yii2-marker-clusterer

Yii2 assets and marker clusterer

  Sources   Download

MIT

The Requires

 

by Edo Freriks

2amigos google maps clusterer

13/02 2017

v1.0.1.x-dev

1.0.1.9999999-dev https://github.com/edofre/yii2-marker-clusterer

Yii2 assets and marker clusterer

  Sources   Download

MIT

The Requires

 

by Edo Freriks

2amigos google maps clusterer

13/02 2017

V1.0.1

1.0.1.0 https://github.com/edofre/yii2-marker-clusterer

Yii2 assets and marker clusterer

  Sources   Download

MIT

The Requires

 

by Edo Freriks

2amigos google maps clusterer

02/08 2016

V1.0.0

1.0.0.0 https://github.com/edofre/yii2-marker-clusterer

Yii2 assets and marker clusterer

  Sources   Download

MIT

The Requires

 

by Edo Freriks

2amigos google maps clusterer