Yii2 OpenStreetMap extension


I've developed îêñè simple OpenStreetMap extension for Yii2, with which you can show any points with a ToolTip. As a card provider OpenLayers used.

Insallationsanweisungen:

  1. Copy of the archive content/widgets/OpenLayers
  2. Einbinder extension in any view:
<?php
/* @var $this yii\web\View */

use app\widgets\OpenLayers\OpenLayers;
use yii\helpers\BaseVarDumper;
use yii\helpers\Html;
?>
<div>

    <div>
        <h1>Multiple Dots</h1>
        <h2>Input</h2>
        <?php $cities = [
            ["name" => "Belize City", "lng" => -88.1975600, "lat" => 17.4995200, "link" => Html::a("link", "http://www.routenplaner24.de/n/stadtplan/belize+city-3582677"), "population" => "3"],
            ["name" => "San Ignacio", "lng" => -89.0796400, "lat" => 17.1576000, "link" => Html::a("link", "http://www.routenplaner24.de/n/stadtplan/san+ignacio-3581194"), "population" => "5"],
            ["name" => "Orange Walk", "lng" => -88.5632800, "lat" => 18.0812400, "link" => Html::a("link", "http://www.routenplaner24.de/n/stadtplan/orange+walk-3581514"), "population" => "6"],
        ];
        BaseVarDumper::dump($cities, 10, true);

        ?>
        <h2>Map</h2>
        <?php echo OpenLayers::widget(['cities' => $cities, 'map_id' => 'multiple']) ?>

    </div>
</div>

and you're done…

yii2_open_street_map_extension

Yii2 OpenStreetMap extension / Widget

 

Download of the extension as .zip file