Vikas Naranje Vikas Naranje - 5 months ago 19x
PHP Question

how to use google place api for my php application

I'm trying to create a web page. When user starts typing in a textbox, an autocomplete city with state name list appears in suggested dropdown box like in google map.

I've got the api for google place autocomplete. But I am unable to implement it.

Can any one suggest me how to implement google place api?

API URL is: Google Place API Page


What i implemented is the below code and it gave me the solution that i wanted -

       <style type="text/css">
               body {
                       font-family: sans-serif;
                       font-size: 14px;
       <title>Google Maps JavaScript API v3 Example: Places Autocomplete</title>
       <script src=";libraries=places" type="text/javascript"></script>
        <script type="text/javascript">
               function initialize() {
                       var input = document.getElementById('searchTextField');
                       var autocomplete = new google.maps.places.Autocomplete(input);
               google.maps.event.addDomListener(window, 'load', initialize);
                       <input id="searchTextField" type="text" size="50" placeholder="Enter a location" autocomplete="on">