Kolyunya / yii2-map-input-widget

A Yii2 input widget which provides a user-friendly interface for selecting geographical coordinates via Google maps. Allows users to select geographical coordinates by clicking on an interative Google map embedded into your web-page. Also allows users to type in a place name to search for it via Google Places API.
http://kolyunya.github.io/yii2-map-input-widget/
GNU General Public License v3.0
28 stars 24 forks source link

SearchBox does not showing at all #26

Open dieruckus opened 2 years ago

dieruckus commented 2 years ago

subj

Hammash commented 6 months ago

set enableSearchBar = '1' - not true

<?= $form->field($model, 'coordinates')->widget( 'kolyunya\yii2\widgets\MapInputWidget', [ 'key' => Yii::$app->params['googleMapApi_Key'], 'latitude' => $model->latitude ?? '24.7136', 'longitude' => $model->longitude ?? '46.6753', 'zoom' => 13, 'height' => '420px', 'animateMarker' => '1', 'enableSearchBar' => '1', 'alignMapCenter' => '1' ] ); ?>

================================================= if not working and need work around

$(document).ready(function() { // to appear map search input appearMapSearchInput(); });

function appearMapSearchInput(){ setTimeout(function() { $('.kolyunya-map-input-widget-search-bar').attr('hidden', false); }, 1000); }