This code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Google Map API Demo</title> <style> body { font-family: Arial, Helvetica, sans-serif; margin: 6px; height: 100%; padding: 0; } html { height: 100%; } a, a:link, a:visited, a:hover, a:active { text-decoration: underline; cursor: pointer; color: #000; } a:hover { text-decoration: none; cursor: pointer; color: #555; } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBs55G3yMieFPKlyyQS8OxzYc0WAzg_76Y&sensor=false"></script> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript"> var GoogleMap = null; function CustomPin(PinImage) { var Position = new google.maps.LatLng('44.4465039', '-73.11029889999998'); // Now that we have our Position Object we can plot it on our map. var marker = new google.maps.Marker({ position: Position, title: 'Custom pin!', map: GoogleMap, icon: (PinImage ? PinImage : ''), animation: google.maps.Animation.DROP }); } jQuery('document').ready(function() { var mapOptions = { center: new google.maps.LatLng('44.208788', '-73.079395'), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; GoogleMap = new google.maps.Map(document.getElementById("google_map_canvas"), mapOptions); // First we need to get a new position object. // We are going to do this by providing a specific latitude and longitude. var Position = new google.maps.LatLng('44.208788', '-73.079395'); // Now that we have our Position Object we can plot it on our map. var marker = new google.maps.Marker({ position: Position, title: 'The first pin!', map: GoogleMap, animation: google.maps.Animation.DROP }); }); </script> </head> <body> <div id="menu_header" style="width:800px; background-color:#CCC; padding:5px 0;" align="center"> <a OnClick="CustomPin('/GoogleMapsAPI/MapMarkers/32x32/MapMarker_Ball_Right_Azure.png');">Custom Pin</a>, <a href="/tutorials/google-maps/#demos">Return</a> </div> <div id="google_map_canvas_parent" style="width:800px; height:600px;"><div id="google_map_canvas" style="width:100%; height:100%;"></div></div> </body> </html>