MediaWiki:Common.js

From WWII Memorial
Revision as of 19:39, 16 April 2018 by Noah (talk | contribs) (Attempt fix 1)
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for all users on every page load. */


/* WWII Living Tree Memorial JavaScript -- 2018-04-15; Noah H. */
$(function(){
  var myElement = document.getElementById('mw-tree-map');
  myElement.innerHTML = '
    <style>
      #map {
        height: 700px;
        width: 100%;
      }
    </style>

    <div id="map"></div>
      <script>
        function initMap() {
          // Map setup
          var uca = {lat: 35.077654,lng: -92.458397};
          var map = new google.maps.Map(document.getElementById('map'), {zoom: 16,center: uca,mapTypeId: 'satellite'});
          
          // Coordinates, other markers
          {
            var bearcoord = {lat: 35.078106,lng: -92.454689};
            var memorialcoord = {lat: 35.078405,lng: -92.455331};
          }

          // Markers, other markers
          {
            var bearmark = new google.maps.Marker({position: bearcoord,label: "Bear",map: map});
            var memorialmark = new google.maps.Marker({position: memorialcoord,label: "Memorial",map: map});
          }

          // Coordinates, trees
          {
            var tree01coord = {lat: 35.078167,lng: -92.456983};
            var tree02coord = {lat: 35.078151,lng: -92.456822};
            var tree03coord = {lat: 35.078148,lng: -92.456652};
            var tree04coord = {lat: 35.078149,lng: -92.456384};
            var tree05coord = {lat: 35.07815,lng: -92.456295};
            var tree06coord = {lat: 35.078149,lng: -92.456177};
            var tree07coord = {lat: 35.078138,lng: -92.456083};
            var tree08coord = {lat: 35.078141,lng: -92.455977};
            var tree09coord = {lat: 35.078128,lng: -92.455666};
            var tree10coord = {lat: 35.078133,lng: -92.455567};
            var tree11coord = {lat: 35.07813,lng: -92.455467};
            var tree12coord = {lat: 35.078273,lng: -92.457155};
            var tree13coord = {lat: 35.078378,lng: -92.45709};
            var tree14coord = {lat: 35.078409,lng: -92.457236};
            var tree15coord = {lat: 35.07844,lng: -92.457341};
            var tree16coord = {lat: 35.078369,lng: -92.457567};
            var tree17coord = {lat: 35.078753,lng: -92.457719};
            var tree18coord = {lat: 35.078563,lng: -92.457731};
            var tree19coord = {lat: 35.078194,lng: -92.45809};
            var tree20coord = {lat: 35.078228,lng: -92.458339};
            var tree21coord = {lat: 35.07825,lng: -92.458598};
            var tree22coord = {lat: 35.07776,lng: -92.454409};
            var tree23coord = {lat: 35.077854,lng: -92.45444};
            var tree24coord = {lat: 35.077957,lng: -92.454414};
            var tree25coord = {lat: 35.07831,lng: -92.455114};
            var tree26coord = {lat: 35.078323,lng: -92.454929};
            var tree27coord = {lat: 35.078331,lng: -92.454821};
            var tree28coord = {lat: 35.078553,lng: -92.454352};
            var tree29coord = {lat: 35.078709,lng: -92.454347};
            var tree30coord = {lat: 35.078871,lng: -92.45432};
            var tree31coord = {lat: 35.078946,lng: -92.454308};
            var tree32coord = {lat: 35.079326,lng: -92.45432};
            var tree33coord = {lat: 35.079632,lng: -92.454305};
            var tree34coord = {lat: 35.080071,lng: -92.454286};
            var tree35coord = {lat: 35.080184,lng: -92.454281};
            var tree36coord = {lat: 35.080268,lng: -92.454282};
            var tree37coord = {lat: 35.07935,lng: -92.455358};
            var tree38coord = {lat: 35.079351,lng: -92.455904};
            var tree39coord = {lat: 35.079352,lng: -92.456125};
            var tree40coord = {lat: 35.079128,lng: -92.45526};
            var tree41coord = {lat: 35.079139,lng: -92.455963};
            var tree42coord = {lat: 35.078424,lng: -92.456175};
            var tree43coord = {lat: 35.076986,lng: -92.454531};
            var tree44coord = {lat: 35.076854,lng: -92.454579};
            var tree45coord = {lat: 35.076752,lng: -92.45453};
            var tree46coord = {lat: 35.076417,lng: -92.454534};
            var tree47coord = {lat: 35.07627,lng: -92.454624};
          }

          // Markers, trees
          {
            var tree01mark = new google.maps.Marker({position: tree01coord,label: "1",map: map});
            var tree02mark = new google.maps.Marker({position: tree02coord,label: "2",map: map});
            var tree03mark = new google.maps.Marker({position: tree03coord,label: "3",map: map});
            var tree04mark = new google.maps.Marker({position: tree04coord,label: "4",map: map});
            var tree05mark = new google.maps.Marker({position: tree05coord,label: "5",map: map});
            var tree06mark = new google.maps.Marker({position: tree06coord,label: "6",map: map});
            var tree07mark = new google.maps.Marker({position: tree07coord,label: "7",map: map});
            var tree08mark = new google.maps.Marker({position: tree08coord,label: "8",map: map});
            var tree09mark = new google.maps.Marker({position: tree09coord,label: "9",map: map});
            var tree10mark = new google.maps.Marker({position: tree10coord,label: "10",map: map});
            var tree11mark = new google.maps.Marker({position: tree11coord,label: "11",map: map});
            var tree12mark = new google.maps.Marker({position: tree12coord,label: "12",map: map});
            var tree13mark = new google.maps.Marker({position: tree13coord,label: "13",map: map});
            var tree14mark = new google.maps.Marker({position: tree14coord,label: "14",map: map});
            var tree15mark = new google.maps.Marker({position: tree15coord,label: "15",map: map});
            var tree16mark = new google.maps.Marker({position: tree16coord,label: "16",map: map});
            var tree17mark = new google.maps.Marker({position: tree17coord,label: "17",map: map});
            var tree18mark = new google.maps.Marker({position: tree18coord,label: "18",map: map});
            var tree19mark = new google.maps.Marker({position: tree19coord,label: "19",map: map});
            var tree20mark = new google.maps.Marker({position: tree20coord,label: "20",map: map});
            var tree21mark = new google.maps.Marker({position: tree21coord,label: "21",map: map});
            var tree22mark = new google.maps.Marker({position: tree22coord,label: "22",map: map});
            var tree23mark = new google.maps.Marker({position: tree23coord,label: "23",map: map});
            var tree24mark = new google.maps.Marker({position: tree24coord,label: "24",map: map});
            var tree25mark = new google.maps.Marker({position: tree25coord,label: "25",map: map});
            var tree26mark = new google.maps.Marker({position: tree26coord,label: "26",map: map});
            var tree27mark = new google.maps.Marker({position: tree27coord,label: "27",map: map});
            var tree28mark = new google.maps.Marker({position: tree28coord,label: "28",map: map});
            var tree29mark = new google.maps.Marker({position: tree29coord,label: "29",map: map});
            var tree30mark = new google.maps.Marker({position: tree30coord,label: "30",map: map});
            var tree31mark = new google.maps.Marker({position: tree31coord,label: "31",map: map});
            var tree32mark = new google.maps.Marker({position: tree32coord,label: "32",map: map});
            var tree33mark = new google.maps.Marker({position: tree33coord,label: "33",map: map});
            var tree34mark = new google.maps.Marker({position: tree34coord,label: "34",map: map});
            var tree35mark = new google.maps.Marker({position: tree35coord,label: "35",map: map});
            var tree36mark = new google.maps.Marker({position: tree36coord,label: "36",map: map});
            var tree37mark = new google.maps.Marker({position: tree37coord,label: "37",map: map});
            var tree38mark = new google.maps.Marker({position: tree38coord,label: "38",map: map});
            var tree39mark = new google.maps.Marker({position: tree39coord,label: "39",map: map});
            var tree40mark = new google.maps.Marker({position: tree40coord,label: "40",map: map});
            var tree41mark = new google.maps.Marker({position: tree41coord,label: "41",map: map});
            var tree42mark = new google.maps.Marker({position: tree42coord,label: "42",map: map});
            var tree43mark = new google.maps.Marker({position: tree43coord,label: "43",map: map});
            var tree44mark = new google.maps.Marker({position: tree44coord,label: "44",map: map});
            var tree45mark = new google.maps.Marker({position: tree45coord,label: "45",map: map});
            var tree46mark = new google.maps.Marker({position: tree46coord,label: "46",map: map});
            var tree47mark = new google.maps.Marker({position: tree47coord,label: "47",map: map});
          }
        }
      </script>
      <script async defer src="https://maps.googleapis.com/maps/api/js?key= AIzaSyBy4w5FcH3HH_bXIChiuf9oM2-FqRHx1bo&callback=initMap"></script>
    ';
  }());