Google Map- How to add Google Maps Autocomplete search box?

Topic:

How to add Google Maps Autocomplete search box?

Solution:

Below are the steps and code.

Include google library.


HTML


SCRIPT

function initialize() {

var input = document.getElementById('searchTextField');
var autocomplete = new google.maps.places.Autocomplete(input);
}

google.maps.event.addDomListener(window, 'load', initialize);

No comments:

Post a Comment