go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  That's it.
 
Subject: That's it.
Author: WebSpider
In response to: Step 4) Display the map with the initial location
Posted on: 06/19/2009 09:44:04 PM

That's the all you need to display a google map in your website. Let's put those steps together.


<html>

  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Google Maps</title>
    <script  type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=
ABQIAAKLPDUET0Qt7v3VcSk6JNU1sBSM5jMcmVqUpI7aqV99cW1cHHCiThQYkcZUPRJn9vy_TWxWvuLbBfSGDw"></script>
  </head>


<body onunload="GUnload()">

    Google map goes here:

    <div id="map" style="width: 550px; height: 450px"></div>

    <script type="text/javascript">
      // Display the map, with the initial location 
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(37.4419, -122.1419), 8);
    </script>

</body>

</html>


 

> On 06/19/2009 09:37:52 PM WebSpider wrote:


   <script type="text/javascript">
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(37.4419, -122.1419),8);
   </script>








References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.