Beispiel #1
0
</h1>-->

    <div class="col-lg-6">
    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['nama', 'email:email', 'no_tlp', 'alamat', 'geojson']]);
?>

    </div>

    <div class="col-lg-6">
            <?php 
echo app\widget\Leaflet::widget();
?>
    </div>

    <?php 
$json = "\n            var Inigeojson = " . $model->geojson . ";\n            L.geoJson(Inigeojson).addTo(map);\n        ";
$this->registerJs($json);
?>

</div>
Beispiel #2
0
			    <?php 
echo $form->field($model, 'type_geometry')->textInput();
?>

			    <div class="form-group">
			        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
			    </div>

			</div>

			<div class="col-lg-6">
					<?php 
echo app\widget\Leaflet::widget(['options' => 'view']);
?>
			</div>


			<script>
					var json =
							L.geoJson(json).addTo(map);
			</script>

			 <?php 
$json = "\n\t\t\t            var Inigeojson = " . $model->geojson . ";\n\t\t\t            L.geoJson(Inigeojson).addTo(map);\n\t\t\t        ";
$this->registerJs($json, yii\web\View::POS_END);
?>

		</div>