Adding Google Marker using postal address

You can point market on google Map using specific address: create a html file as “index.html� and add below code:
 <!DOCTYPE html>
 <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
 <meta charset="utf-8">
 <title>Geocoding service</title>
 <script src=""></script>
var geocoder;
var map;
function codeAddress() {
 var address = document.getElementById('address').value;
 geocoder.geocode( { 'address': address}, function(results, status) {
 if (status == google.maps.GeocoderStatus.OK) {
 document.getElementById("latitude").value = results[0];
 document.getElementById("longitude").value = results[0].geometry.location.lng();
 } else {
 alert('Geocode was not successful for the following reason: ' + status);
var marker;
function placeMarker(location,map) {
 if ( marker ) {
 } else {
 marker = new google.maps.Marker({
 position: location,
 map: map
function initialize() {
 geocoder = new google.maps.Geocoder();
 var latlng = new google.maps.LatLng(-34.397, 150.644);
 var mapOptions = {
 zoom: 8,
 center: latlng
 map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
 google.maps.event.addListener(map, 'click', function (e) {
 document.getElementById("latitude").value =;
 document.getElementById("longitude").value = e.latLng.lng();

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

 <div id="panel">
 <input id="address" type="textbox" value="Sydney, NSW">
 <input type="button" value="Geocode" onclick="codeAddress()">
 <div id="map-canvas" style="width: 300px; height: 300px"></div>
 <input type="text" name="latitude" id="latitude"/>
 <input type="text" name="longitude" id="longitude"/>
[si-contact-form form='1']

Your feedbacks are most welcome..