Maps with Marker

<!DOCTYPE html>
<title>Add Marker to Map</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
html, body, #map-canvas {
height: 90%;
margin: 0px;
padding: 0px
<script src=""></script>
<script src=""></script>
var map;
function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(1.288633, 103.837534)
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
google.maps.event.addDomListener(window, 'load', initialize);


jQuery("#addmarker").bind("click", function(){
var marker = new google.maps.Marker({
position: new google.maps.LatLng( 1.288633, 103.837534),
map: map,
title: 'Hello World!'

var contentString = '<div id="content" style="width: 200px; height: 200px;"><h1>Overlay</h1></div>';
var infowindow = new google.maps.InfoWindow({
content: contentString

google.maps.event.addListener(marker, 'click', function() {,marker);

// To add the marker to the map, call setMap();
<div id="map-canvas"></div>
<a href="javascript:void(0);" id="addmarker">Add marker</a>