pigochu / yii2-jquery-locationpicker

jquery location picker widget for yii2
20 stars 7 forks source link

Remove Default Value #25

Closed deshario closed 6 years ago

deshario commented 6 years ago

How can i remove default value of campaign_coordinates ... I wanna make user select manually ... In this case .. either user dont select location ... it will be default value ... I wanna show error message below the campaign_coordinates field if user dont select location.

remove22

remove

deshario commented 6 years ago

https://github.com/pigochu/yii2-jquery-locationpicker/issues/5#issuecomment-266165174

I clear default value like this :

document.getElementById('campaigns-campaign_coordinates').value = '';

Is it possible to hide default marker also ... how can we do that

pigochu commented 6 years ago

@deshario

please read google map document

https://developers.google.com/maps/documentation/javascript/examples/marker-remove

You can get google map instance , ex: var map = $("your-coordinates-id').locationpicker("map").map;