
<!--  
=================================Comment Start =============================================================================
Interactive Google Maps, with Offset lines and distance calculator 

Version history
  v 2.0  March 2008 
         original code by Geoff Hitchcox, Christchurch, New Zealand
  V 4.1  November 2013            
         code updated by Steve Preston, Washington, USA  as the result of major changes to
         the GoogleMaps API.
  V 4.2  September 2014            
         fixed omission of a colon. Specifically, src="https//maps.... corrected to read src="https://maps...

NOTE: Edit this file with NOTEPAD (or similar) but turn OFF wordwrap!

Please be very careful editing this file, it is a "computer program" so
any slight mistake - will cause the webpage to malfunction or not work.

Contact Derek, at    breit_ideas@hotmail.com    for assistance.
2013 Nov - mods by SBP

See **** symbols below, on how to customise this script for your website:

Two lines, need to be customised for each website:

(1) Obtain a "Google Key" (free) for your site, go to 

    http://www.google.com/apis/maps/signup.html
 
to obtain a Google Key, you can then replace "mine" (which wont work on your site) 
with your own Google Key.

(2) To speed up the loading of your maps, you may want to place the javascript called

GoogleMap_ServerDriver_2.js
 
in a directory in your website. This will load faster than getting it from the web each time.

==================================Comment End============================================================================
-->

<!DOCTYPE html >
<html>
<head>

<!-- *** The following "script" lines need to be customised for your website: -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDbY4t06To0_g8A-wp9uJWLc0P-TgrLKDA&sensor=false"></script>
<script type="text/javascript" src="http://www.netstevepr.com/GoogleMap_ServerDriver_2.js"></script>

<title>IOTA</title>

<!-- Set the displayed header version number HERE -->
  <div align="left"><small><small>H4.1</small></small></div>


  <div style="text-align: center">

        <H3 align="center"><I><font size="5" color="#000080">Interactive GoogleMap of Shadow Path</font></I></H3>

        <font face="Times New Roman" color="#000080" size="4"><b>Generated using Occult v4<br>
        </b></font>This is a beta test (does not work on all browsers) using GOOGLE Maps.<font face="Times New Roman" size="3">
        <br>Google map and offset coding by Geoff Hitchcox
        <a target="_blank" href="http://www.geocities.com/kiwi_36_nz/">&lt;Kiwi Geoff&gt;</a>
        <br>
        Additional script coding by Rob Walker and Kyle Mulka. </font>&nbsp;Path calculations by <A HREF="http://www.lunar-occultations.com/iota/occult4.htm"
        TARGET="_blank">OCCULT</A> software.

        <p>Zoom in and out with control at left of map. You can &quot;drag&quot; map by holding down left mouse button. <br>
        Double-clicking will center map at tip of mouse pointer, the lat/lon and perpendicular distance from center path is then given beneath map. <br>
        GREEN=Center of Path , Gray=User defined offsets to center line. <br>
        BLUE=Predicted Path , RED=One Sigma Error Limits. <br>
        Top of Map = North , Left = West , Right = East , Bottom = South <br>
        <br>
        #### Handy HINT #### If you are using dialup and not all tiles load on the map, press the &quot;-&quot; pad on the zoom control (left side of map) then one second later press the &quot;+&quot; pad. This will take you back to the same zoom setting, but reload any tiles that are missing.&nbsp;
        <br>

        <!-- 
        Following "Page Name" addition by GRH March 2007 
        -->

        <H3 align="center">
        <div id="page_name"><font color="#000080"><i><b>## Place Holder for NAME of event ##</b></i></font></div>
        </H3>

        Top of Map = North , Left = West , Right = East , Bottom = South
        <BR><BR>
        Use + or - in following input boxes to decide which side of the GREEN line to draw line.
        <BR>
        A + value places a line on the True Right Hand Side of the path (in direction of increasing time).
        <BR>
        When this page initially opens, one gray line is set further out from the center (GREEN) path.
        <BR>
        The further displaced gray line (as you zoom in) is the True RIGHT HAND side of the path.

        <!-- ****
        In the following FORM, you can "preload" the two OFFSET line values
        I have set the default to    value="+5.0"   and    value="-5.0"
        If you want to change the two lines to something else, change 5 to whatever,
        HOWEVER to ensure the page starts with those values see **** a few lines down
        -->

        <form><p>To set gray offset line A (in km perpendicular to GREEN line), edit this box <input name="offset" size="5" value="+15.0"> then
        <input type="button" onClick="newoffsetA(this.form);" value="Click Here"></p></form>
        <form>To set gray offset line B (in km perpendicular to GREEN line), edit this box <input name="offset" size="5" value="-5.0"> then
        <input type="button" onClick="newoffsetB(this.form);" value="Click Here"></form>
  </div>

  <script type="text/javascript"> 
    function disable_Enter_Key(evt)   // Disable ENTER or RETURN key when people use "offset" input form, GRH DEC 2007
    { 
      var evt = (evt) ? evt : ((event) ? event : null); 
      var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); 
      if ((evt.keyCode == 13) && (node.type=="text")) {return false;} 
    } 
    document.onkeypress = disable_Enter_Key; 
  </script> 

  <script type="text/javascript">

            // **** Edit the following 2 lines, if you wish OFFSET lines, different to 5 Km
            var offset_A  = +15.0;  // A offset to centre line (km)
            var offset_B  = -5.0;   // B offset to centre line (km)

            // Global variables
            var pi = Math.PI;
            var offset  = 2.0;  // value used in calculation
            var bearing = 90.0; // bearing of coordinates
            var lonrad1 = 36.0; // temporary points (in radians)
            var lonrad2 = 36.0;
            var latrad1 = 36.0;
            var latrad2 = 36.0;
            var map = ""        // set map variable as global.
            var pathctr = []    // Array to be used to hold center path
            var offpts1 = []    // Array to be used for one the Offset lines
            var offpts2 = []    // Array to be used for other Offset line
            var polypts_cnt = 0;
            var pathcount = 0;  // Number of points in path
            onerror = handleErrors;	
            var msg = null;
            var page_name_string = "Name of Event is placed here!"; // Added by GRH March 2007 
            var reverse_time_order = 0; // will be = 1 if coordinates are in descending time order, used to determine TRUE RIGHT on shadow path. Nov 2007 GRH
            // reverse_time_order = 0;          // Coordinates are in ascending time order, Nov 2007, Dave Herald
            // reverse_time_order = 1;          // Coordinates are in descending time order, Nov 2007, Dave Herald
            // reverse_time_order = -1;         // do not plot arrows. Assume coordinates are in ascending, Nov 2007, Dave Herald 

            function onLoad()
            {

                var mapOptions = {
                    zoom: 2,
                    center: new google.maps.LatLng(-41.252017,173.106207),
                    panControl: true,
                    zoomControl: true,
                    mapTypeControl: true,
                    scaleControl: true,
                    overviewMapControl: true,
                    disableDoubleClickZoom: true
                };
                
                map = new google.maps.Map(document.getElementById("map-canvas"),mapOptions);

                map.setCenter(new google.maps.LatLng(-41.252017,173.106207),3); // Needs to come before "map.addOverlay();"


		offset_A = 15.0;
                offset_B = -5.0;


// Insert TRACK.GOO (ex SHADOW.EXE) below here, OR WinOccult data.
//
//************* END OF File Header ************************************************//

