2017 © Pedro Peláez
 

yii2-extension yii2-leaflet-polyline-measure-plugin

Plugin to measure distances of simple lines as well as of complex polylines

image

yankovskiy/yii2-leaflet-polyline-measure-plugin

Plugin to measure distances of simple lines as well as of complex polylines

  • Saturday, June 16, 2018
  • by yankovskiy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Plugin for leaflet extension

Plugin for yii2 based on the Leaflet.PolylineMeasure to measure distances of simple lines as well as of complex polylines, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist yankovskiy/yii2-leaflet-polyline-measure-plugin "0.1.1"

or add, (*4)

"yankovskiy/yii2-leaflet-polyline-measure-plugin": "0.1.1"

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

Usage

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

$center = new dosamigos\leaflet\types\LatLng(['lat' => 43.105620, 'lng' => 131.873530]);

$osmLayer = new \dosamigos\leaflet\layers\TileLayer([
    'urlTemplate' => 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
    'clientOptions' => [
        'attribution' => '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    ],
]);

$polylineMeasure = new \neverdark\leaflet\PolylineMeasure();

$leaflet = new \dosamigos\leaflet\LeafLet([
    'center' => $center, // set the center
]);

$leaflet->addLayer($osmLayer);
$leaflet->installPlugin($polylineMeasure);


echo \dosamigos\leaflet\widgets\Map::widget(['height' => '700px', 'leafLet' => $leaflet]);

The Versions

16/06 2018

dev-master

9999999-dev

Plugin to measure distances of simple lines as well as of complex polylines

  Sources   Download

GPL-3.0+

The Requires

 

by Artem Yankovskiy

extension yii2 leaflet

16/06 2018

0.1.1

0.1.1.0

Plugin to measure distances of simple lines as well as of complex polylines

  Sources   Download

GPL-3.0+

The Requires

 

by Artem Yankovskiy

extension yii2 leaflet

15/06 2018

0.1.0

0.1.0.0

Plugin to measure distances of simple lines as well as of complex polylines

  Sources   Download

GPL-3.0+

The Requires

 

by Artem Yankovskiy

extension yii2 leaflet