Advertisement
Guest User

Untitled

a guest
Feb 15th, 2012
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.98 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="_LANGUAGE" xml:lang="_LANGUAGE">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.  
  6. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  7. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  8.  
  9. <script type="text/javascript" src="selfcontainedmap2.js"></script>
  10.  
  11. <script type="text/javascript" language="javascript">
  12. <!--
  13. $(document).ready(function() {
  14.     //Default Action
  15.     $(".tab_content").hide();
  16.     $("ul.tabs li:first").addClass("active").show();
  17.     $(".tab_content:first").show();
  18.  
  19.     //On Click Event
  20.     $("ul.tabs li").click(function() {
  21.         $("ul.tabs li").removeClass("active");
  22.         $(this).addClass("active");
  23.         $(".tab_content").hide();
  24.         var activeTab = $(this).find("a").attr("href");
  25.         $(activeTab).fadeIn();
  26.         if(activeTab == '#maptab') {
  27.             $(window).resize(function(){
  28.             //$("#tab2").css({'display':'block'});
  29.             //$("#map_canvas").css({'width':'630px', 'height':'400px'});
  30.             //initialize();
  31.             //alert('Changed!');
  32.             });
  33.             }
  34.         return false;
  35.     });
  36. });
  37. -->
  38. </script>
  39.  
  40.  
  41. </head>
  42. <body onload="initialize2();">
  43. <div class="container">
  44.     <h1 style="text-align: center;">Complete graph</h1>
  45.  
  46.     <ul class="tabs">
  47.     <!-- <li><a href="#tab1">About</a></li> -->
  48.     <li><a href="#maptab" id="showMap">Map</a></li>
  49. <!--     <li><a href="#optiontab">Options</a></li> -->
  50.     </ul>
  51. <!-- Start tab container -->
  52. <div class="tab_container">
  53.  
  54.     <!-- <div id="tab1" class="tab_content">
  55.            <h2>About</h2>
  56.            <p>Txt Tab1</p>
  57.    </div> -->
  58.  
  59.     <div id="maptab" class="tab_content">
  60.     <h2>Please locate desired terrain</h2>
  61.    
  62.     <script type="text/javascript" language="javascript">
  63.     //<![CDATA[
  64.    $(document).ready(function() {
  65.  
  66.      function initialize() {
  67.        var myLatlng = new google.maps.LatLng(37.426616,-122.172380);
  68.        var myOptions = {
  69.          zoom: 18,
  70.          center: myLatlng,
  71.          mapTypeId: google.maps.MapTypeId.HYBRID
  72.        }
  73.  
  74.        var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  75.        map.setTilt(0);
  76.  
  77.      }
  78.         // Function added to help reset map and container boundaries
  79.        $("#showMap").click(function() {
  80.        // the line that centres it for the tab instead of the page
  81.        $("#maptab").css({'display':'block'});
  82.        $("#map_canvas").css({'width':'946px', 'height':'500px'});
  83.        initialize();
  84.        //alert('showMap Clicked!');
  85.        });
  86.  
  87.     initialize();
  88.  
  89.    });
  90.    //]]>
  91.     </script>
  92.  
  93.     <a id="writeit" href="javascript:">Write it</a>
  94.     </div>
  95.  
  96.  
  97. </div>
  98. <!-- End tab container -->
  99.  
  100.  
  101. </div>
  102. <div id="map" style="width:946px;height:500px; float:left; margin:5px;"></div>
  103. <div id="result"></div>
  104. <div id="info"></div>
  105. </body>
  106. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement