Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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" lang="_LANGUAGE" xml:lang="_LANGUAGE">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- <script type="text/javascript" src="selfcontainedmap2.js"></script>
- <script type="text/javascript" language="javascript">
- <!--
- $(document).ready(function() {
- //Default Action
- $(".tab_content").hide();
- $("ul.tabs li:first").addClass("active").show();
- $(".tab_content:first").show();
- //On Click Event
- $("ul.tabs li").click(function() {
- $("ul.tabs li").removeClass("active");
- $(this).addClass("active");
- $(".tab_content").hide();
- var activeTab = $(this).find("a").attr("href");
- $(activeTab).fadeIn();
- if(activeTab == '#maptab') {
- $(window).resize(function(){
- //$("#tab2").css({'display':'block'});
- //$("#map_canvas").css({'width':'630px', 'height':'400px'});
- //initialize();
- //alert('Changed!');
- });
- }
- return false;
- });
- });
- -->
- </script>
- </head>
- <body onload="initialize2();">
- <div class="container">
- <h1 style="text-align: center;">Complete graph</h1>
- <ul class="tabs">
- <!-- <li><a href="#tab1">About</a></li> -->
- <li><a href="#maptab" id="showMap">Map</a></li>
- <!-- <li><a href="#optiontab">Options</a></li> -->
- </ul>
- <!-- Start tab container -->
- <div class="tab_container">
- <!-- <div id="tab1" class="tab_content">
- <h2>About</h2>
- <p>Txt Tab1</p>
- </div> -->
- <div id="maptab" class="tab_content">
- <h2>Please locate desired terrain</h2>
- <script type="text/javascript" language="javascript">
- //<![CDATA[
- $(document).ready(function() {
- function initialize() {
- var myLatlng = new google.maps.LatLng(37.426616,-122.172380);
- var myOptions = {
- zoom: 18,
- center: myLatlng,
- mapTypeId: google.maps.MapTypeId.HYBRID
- }
- var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
- map.setTilt(0);
- }
- // Function added to help reset map and container boundaries
- $("#showMap").click(function() {
- // the line that centres it for the tab instead of the page
- $("#maptab").css({'display':'block'});
- $("#map_canvas").css({'width':'946px', 'height':'500px'});
- initialize();
- //alert('showMap Clicked!');
- });
- initialize();
- });
- //]]>
- </script>
- <a id="writeit" href="javascript:">Write it</a>
- </div>
- </div>
- <!-- End tab container -->
- </div>
- <div id="map" style="width:946px;height:500px; float:left; margin:5px;"></div>
- <div id="result"></div>
- <div id="info"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement