2017 © Pedro Peláez
 

yii2-extension yii2-leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

image

2amigos/yii2-leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  • Thursday, July 20, 2017
  • by tonydspaniard
  • Repository
  • 19 Watchers
  • 2 Stars
  • 3,345 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

Geo Search Plugin

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Yii 2 LeafletJs Plugin that adds support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet. This Plugin works in conjunction with LeafLet library for Yii 2 framework., (*2)

Installation

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

Either run, (*4)

composer require 2amigos/yii2-leaflet-geosearch-plugin:~1.0

or add, (*5)

"2amigos/yii2-leaflet-geosearch-plugin" : "~1.0"

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

Usage

use dosamigos\leaflet\layers\TileLayer;
use dosamigos\leaflet\LeafLet;
use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\plugins\geosearch\GeoSearch;

$center = new LatLng(['lat' => 39.67442740076734, 'lng' => 2.9347229003906246]);

$geoSearchPlugin = new GeoSearch([
    'service' => GeoSearch::SERVICE_OPENSTREETMAP,
    // uncomment following block to define custom labels
    /*
    'clientOptions' => [
        'searchLabel' => 'enter address here',
        'notFoundMessage' => 'no address found',
    ],
    */
]);

$tileLayer = new TileLayer([
    'urlTemplate' => 'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png',
    'clientOptions' => [
        'attribution' => 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors',
        'subdomains' => '1234'
    ]
]);

$leafLet = new LeafLet([
    'name' => 'geoMap',
    'tileLayer' => $tileLayer,
    'center' => $center,
    'zoom' => 10,
    'clientEvents' => [
        // setting up one of the geo search events for fun
        'geosearch_showlocation' => 'function(e){
            console.log(e.target);
        }'
    ]
]);

// add the plugin
$leafLet->installPlugin($geoSearchPlugin);

// run the widget (you can also use dosamigos\leaflet\widgets\Map::widget([...]))
echo $leafLet->widget();

Contributing

Please see CONTRIBUTING for details., (*7)

Credits

License

The BSD License (BSD). Please see License File for more information., (*8)

2amigOS!, (*9)

Web development has never been so fun!
www.2amigos.us, (*10)

The Versions

20/07 2017

dev-master

9999999-dev http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

10/09 2016

1.0.5

1.0.5.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

10/09 2016

1.0.4

1.0.4.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

08/02 2016

1.0.3

1.0.3.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

08/02 2016

1.0.2

1.0.2.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

31/03 2015

1.0.1

1.0.1.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

31/03 2015

1.0.0

1.0.0.0 http://yiiwheels.com/extension/leaflet-geosearch-plugin

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin extension yii2 2amigos yii maps yii 2 widget leaflet

23/04 2014

0.1.0

0.1.0.0

Yii2 LeafLet Plugin to provide support for address lookup (a.k.a. geocoding / geoseaching) to Leaflet.

  Sources   Download

BSD-3-Clause

The Requires

 

plugin extension yii maps widget leaflet