<input type="text" id="search_address" value="" size="98"/> <button onclick="search();">Search</button> < div id="mapCanvas" style="width:100%; height:100%; min-width:300px; min-height:300px"></div>< script type="text/javascript">// initialize the google Mapsfunction initializeGoogleMap() {// set latitude and longitude to center the map aroundvar latlng = new google.maps.LatLng(37.77,-122.4);// set up the default optionsvar myOptions = {zoom: 8,center: latlng,navigationControl: true,navigationControlOptions:{style: google.maps.NavigationControlStyle.DEFAULT,position: google.maps.ControlPosition.TOP_LEFT },mapTypeControl: true,mapTypeControlOptions:{style: google.maps.MapTypeControlStyle.DEFAULT,position: google.maps.ControlPosition.TOP_RIGHT },scaleControl: true,scaleControlOptions: {position: google.maps.ControlPosition.BOTTOM_LEFT},mapTypeId: google.maps.MapTypeId.ROADMAP,draggable: true,disableDoubleClickZoom: false,keyboardShortcuts: true};var map = new google.maps.Map(document.getElementById("mapCanvas"), myOptions);if (true) {var trafficLayer = new google.maps.TrafficLayer();trafficLayer.setMap(map);}if (true) {var bikeLayer = new google.maps.BicyclingLayer();bikeLayer.setMap(map);}if (true) {addMarker(map,37.7715,-122.4,"We are here");}}window.onload = initializeGoogleMap();// Add a marker to the map at specified latitude and longitude with tooltipfunction addMarker(map,lat,long,titleText) {var markerLatlng = new google.maps.LatLng(lat,long);var marker = new google.maps.Marker({position: markerLatlng,map: map,title:"We are here",icon: ""});}function search() {var searchText = document.getElementById('search_address');if (searchText != '') { geocoder.geocode({ address: searchText}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { var viewport = results[0].geometry.viewport; var location = results[0].geometry.location; if (viewport) { map.fitBounds(viewport); } else { map.setCenter(location); } } });}}</script> So you are saying it will be something like this. But I am not sure if I have to wrap this. Because when I enter an address(e.g: United Kingdom) and press "serach", it doesnt take me to the UK map. It works only zoom in and zoom out by cursor.