function initialize() { var latlng = new google.maps.LatLng(21.698265,79.035645); var myOptions = { zoom: 4, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); }
<html> <title>Google Maps API v3 - Map within an image</title> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> </script> </head> <body onload="initialize()"> <div style="background:url('http://allonzyinteractive.com/iPadFrame.png') no-repeat; height:448px; width:350px"> <div id="map_canvas" style="top:42px; height:364px; width:274px; left:38px"> </div> </body> </html>