A robust starter web application to ease Java webapp development.

Home | Tutorials | Demos | Issues

 « Return to Thread: include google map function in .jsp

include google map function in .jsp

by maker su :: Rate this Message:

Reply to Author | View in Thread

Hi All,
I create map.jsp for show google map but not work.
Please hint.
Thanks,
Maker su
 
// from http://code.google.com/intl/zh-TW/apis/maps/documentation/examples/map-simple.html
 
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example: Simple Map</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;sensor=false&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA"
            type="text/javascript"></script>
    <script type="text/javascript">
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        map.setUIToDefault();
      }
    }
    </script>
  </head>
  <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
  </body>

 « Return to Thread: include google map function in .jsp