You need to sign in to do that
Don't have an account?
Rony57
How to use Google Places API with a search button?
Hello Guys i am stuck in the google map while using it in VF page . I need to locate the city along with the street adress on the google map and draw radius when ever user click on the search button . My Autocomplete textbox is working . I need to add the seach functionality on the seach button.
Here is my code:-
Help me out
Here is my code:-
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script> <script type="text/javascript"> var map; function initializeField() { var input = document.getElementById('page:frm:field'); var autocomplete = new google.maps.places.Autocomplete(input); var mapOptions = { zoom:6, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false, center: new google.maps.LatLng(20.593684,78.962880) }; map = new google.maps.Map(document.getElementById('MyMap'), mapOptions); } google.maps.event.addDomListener(window, 'load', initializeField); </script> <input type="button" class="btn customBtn pull-right" value="Search" />
Help me out
I have found out a very similar code to this.
http://stackoverflow.com/questions/20491405/how-to-use-google-places-api-with-a-search-button
Please let me know if this helps
Best regards
Naga Kiran