Identificarse | Registrarse | FAQ
Anonymous

Hide/show few objects together

+ Publicar una respuesta

1 mensaje Página 1 de 1


Hide/show few objects together

por gonen » Mar Abr 17, 2018 7:55 pm

Hi. I am new to HTML and I am asking help on how to:
1 - Add a button to the following html that will hide/show all the objects of "DAY 01" (code starts with "Day 01" and ends with "End of Day 01")
2 - There are currently two buttons in the html - one to "Hide Routes" and second to "Display Route" - Is there a way to change it to single button - that will toggle - hide/display a route ?

here is my code. Thanks for a sample

Código: Seleccionar todo
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>Sample.html</title>
    <style>
      html, body {height: 100%; margin: 0; padding: 0;}
      #map {height: 100%;}
     #floating-panel {
        position: absolute;
        top: 10px;
        left: 25%;
        z-index: 5;
        background-color: #fff;
        padding: 5px;
        border: 1px solid #999;
        text-align: center;
        font-family: 'Roboto','sans-serif';
        line-height: 30px;
        padding-left: 10px;
      }
    </style>
  </head>
  <body>
<div id="floating-panel">
<input onclick="HideDayInfo();" type=button value="Hide Day info" style="font-size:10pt;color:white;background-color:red;border:2px solid #336600;padding:6px">
<input onclick="ShowDayInfo();" type=button value="Show Day Info" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">

<input onclick="removeLine();" type=button value="Hide Route" style="font-size:10pt;color:white;background-color:red;border:2px solid #336600;padding:6px">
<input onclick="addLine();" type=button value="Display Route" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">

<input onclick="addinfoNum();" type=button value="Display ID(row) only" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">

<input onclick="hideinfo();" type=button value="Hide info" style="font-size:10pt;color:white;background-color:red;border:2px solid #336600;padding:6px">
<input onclick="addinfo();" type=button value="Display info" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">
<input onclick="addinfos();" type=button value="Display X info (single route only)" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">

<input onclick="hidemarkers();" type=button value="Hide Markers"  style="font-size:10pt;color:white;background-color:red;border:2px solid #336600;padding:6px">
<input onclick="showmarkers();" type=button value="Show Markers" style="font-size:10pt;color:white;background-color:green;border:2px solid #336600;padding:6px">
    </div>
    <div id="map"></div>
    <script>
var markers = [];
var Info0;
var Info1;
var Info2;
var Info3;
var InfoS0;
var InfoS1;
var InfoS2;
var InfoS3;
  var InfoS0a;
var InfoS1a;
var InfoS2a;
var InfoS3a;
  var BaloonS0;
var BaloonS1;
var BaloonS2;
var BaloonS3;
  var BaloonS0a;
var BaloonS1a;
var BaloonS2a;
var BaloonS3a;
  var Baloon0;
var Baloon1;
var Baloon2;
var Baloon3;
var Poi0;
var Poi1;
var Poi2;
var Poi3;
var PoiLoc0;
var PoiLoc1;
var PoiLoc2;
var PoiLoc3;
var route0;   
var route1;
var route2;
var map;
var     DayInfoIcon = 'https://drive.google.com/open?id=0B5NN2cJHBzScZWs0d3BhVGxYM2M'
//var   DayInfoIcon = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScZWs0d3BhVGxYM2M'

var blue0 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzSca3h1VUh1eWFNbG8'                       
var blue1 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScNk5YTEVuUGxJbjg'                       
var blue2 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzSccXRwQ0NPUV9QYXc'   
var blue3 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScYzRlbjJFRkNlYkE'   
var   red0 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScZDJLa1VDd28tOU0'
var   red1 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScZy0tdHpEbnFkSVE'
var   red2 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScU3ZNVFVmVWg4Q3c'
var   red3 = 'https://drive.google.com/uc?export=download&id=0B5NN2cJHBzScbVI2aVlybnNiM28'

function CenterControl(controlDiv, map) {

  // Set CSS for the control border.
  var controlUI = document.createElement('div');
  controlUI.style.backgroundColor = '#fff';
  controlUI.style.border = '2px solid #fff';
  controlUI.style.borderRadius = '3px';
  controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)';
  controlUI.style.cursor = 'pointer';
  controlUI.style.marginBottom = '22px';
  controlUI.style.textAlign = 'center';
  controlUI.title = 'Click to recenter the map';
  controlDiv.appendChild(controlUI);

  // Set CSS for the control interior.
  var controlText = document.createElement('div');
  controlText.style.color = 'rgb(25,25,25)';
  controlText.style.fontFamily = 'Roboto,Arial,sans-serif';
  controlText.style.fontSize = '16px';
  controlText.style.lineHeight = '38px';
  controlText.style.paddingLeft = '5px';
  controlText.style.paddingRight = '5px';
  controlText.innerHTML = 'Center Map';
  controlUI.appendChild(controlText);

  // Setup the click event listeners: simply set the map to Centr.
  controlUI.addEventListener('click', function() {
    map.setCenter(Centr);
  });
}
   
function initMap() {
  var Centr = {lat: 64.4275065, lng: -22.6663865};
  map = new google.maps.Map(document.getElementById('map'), {
    zoom: 9,
    center: Centr,
   scaleControl: true,
         scaleControlOptions: {
              position: google.maps.ControlPosition.LEFT_TOP
          },
          fullscreenControl: true,
         mapTypeControl: true,
         mapTypeControlOptions: {
            style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
            position: google.maps.ControlPosition.BOTTOM_CENTER
          }
  });
 
[color=#FF0000]// [b]Day 01[/b] 

        //*  DayInfo
   PoiDayinfo1 = '<div id="content">'+
     '<div id="siteNotice">'+
      '</div>'+
     '<h1 id="firstHeading" class="firstHeading">Day  01</h1>'+
     '</div>';
   
   
   PoiLocDayinfo1 = {lat: 64.4275065, lng: -22.6663865};
    //   icon: DayInfoIcon
   PoiDayinfo = new google.maps.Marker({position: PoiLocDayinfo1, map: map, icon: DayInfoIcon, title: PoiDayinfo1, draggable:true, borderWidth: 5 });   
   markers.push(PoiDayinfo);
   PoiDayinfo.addListener('click', function() {
   BaloonDayinfo1.open(map, PoiDayinfo);
  });
  BaloonDayinfo1 = new google.maps.InfoWindow({content: PoiDayinfo1});
  //BaloonDayinfo1.open(map,PoiDayinfo);
//=================================================================================================================================================================== 
//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt
        //* poi  1
   Info1 = "S 4624- FLT5 IS,Kef Airport -.(6)";
   InfoS1 = Info1.substr(0,12);
   InfoS1a = "4624 (6)";     
   PoiLoc1 = {lat: 63.998358, lng: -22.627759}; 
    //   icon: red1
   Poi1 = new google.maps.Marker({position: PoiLoc1, map: map, icon: red1, title: Info1 });   
   markers.push(Poi1);
   Poi1.addListener('click', function() {
   Baloon1.open(map, Poi1);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick1 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>S 4624- FLT5 IS,Kef Airport -.(6)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon1 = new google.maps.InfoWindow({content: Info1});
    BaloonS1 = new google.maps.InfoWindow({content: InfoS1});
    BaloonS1a = new google.maps.InfoWindow({content: InfoS1a});



//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt

       
        //* poi  2
   Info2 = "R 4657- ATR9 IS,Mosfellsbaer -Laxnes Horse Farm(7)";
   InfoS2 = Info2.substr(0,12);
   InfoS2a = "4657 (7)";     
   PoiLoc2 = {lat: 64.182735, lng: -21.629162}; 
    //   icon: red2
   Poi2 = new google.maps.Marker({position: PoiLoc2, map: map, icon: red2, title: Info2 });   
   markers.push(Poi2);
   Poi2.addListener('click', function() {
   Baloon2.open(map, Poi2);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick2 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>R 4657- ATR9 IS,Mosfellsbaer -Laxnes Horse Farm(7)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon2 = new google.maps.InfoWindow({content: Info2});
    BaloonS2 = new google.maps.InfoWindow({content: InfoS2});
    BaloonS2a = new google.maps.InfoWindow({content: InfoS2a});



//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt

       
        //* poi  3
   Info3 = "ES 10783- LDG0 IS,Hafnarskogur -Hafnarskogur Hotel(8)";
   InfoS3 = Info3.substr(0,12);
   InfoS3a = "10783 (8)";     
   PoiLoc3 = {lat: 64.51799, lng: -21.891955}; 
    //   icon: red3
   Poi3 = new google.maps.Marker({position: PoiLoc3, map: map, icon: red3, title: Info3 });   
   markers.push(Poi3);
   Poi3.addListener('click', function() {
   Baloon3.open(map, Poi3);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick3 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>ES 10783- LDG0 IS,Hafnarskogur -Hafnarskogur Hotel(8)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon3 = new google.maps.InfoWindow({content: Info3});
    BaloonS3 = new google.maps.InfoWindow({content: InfoS3});
    BaloonS3a = new google.maps.InfoWindow({content: InfoS3a});

//* ==========================================================================================================
//* GM4_multi_coordinates_Html.txt

//* route  1 - D:\aagon\data\Poi\Dropbox\Trips\I111\Day_01.txt     from 63.998499 -22.6275 to 64.51823 -21.891944


  var coors1 = [{lat: 63.998499, lng: -22.6275}, {lat: 63.998319, lng: -22.62722}, {lat: 63.9993, lng: -22.628049}, {lat: 63.99995, lng: -22.62773}, {lat: 64.000589, lng: -22.62667}, {lat: 64.002709, lng: -22.610059}, {lat: 64.00281, lng: -22.602839}, {lat: 64.00266, lng: -22.602589}, {lat: 64.002679, lng: -22.60219}, {lat: 64.002189, lng: -22.600919}, {lat: 63.99995, lng: -22.594879}, {lat: 63.995129, lng: -22.585389}, {lat: 63.99144, lng: -22.579769}, {lat: 63.98465, lng: -22.57058}, {lat: 63.98184, lng: -22.56542}, {lat: 63.98029, lng: -22.561969}, {lat: 63.980129, lng: -22.56137}, {lat: 63.9743, lng: -22.55267}, {lat: 63.97264, lng: -22.54743}, {lat: 63.97159, lng: -22.538069}, {lat: 63.966279, lng: -22.485649}, {lat: 63.96201, lng: -22.454429}, {lat: 63.96138, lng: -22.44488}, {lat: 63.96149, lng: -22.43454}, {lat: 63.963279, lng: -22.407729}, {lat: 63.964439, lng: -22.39661}, {lat: 63.967219, lng: -22.38091}, {lat: 63.969799, lng: -22.37099}, {lat: 63.97273, lng: -22.36272}, {lat: 63.975589, lng: -22.35325}, {lat: 63.98985, lng: -22.29435}, {lat: 63.994369, lng: -22.2776}, {lat: 63.99678, lng: -22.2667}, {lat: 64.000749, lng: -22.23739}, {lat: 64.00344, lng: -22.222519}, {lat: 64.011579, lng: -22.184929}, {lat: 64.012689, lng: -22.18206}, {lat: 64.014639, lng: -22.178709}, {lat: 64.016229, lng: -22.174739}, {lat: 64.01731, lng: -22.168849}, {lat: 64.020059, lng: -22.139879}, {lat: 64.02144, lng: -22.132869}, {lat: 64.02416, lng: -22.124269}, {lat: 64.025419, lng: -22.119289}, {lat: 64.02734, lng: -22.10325}, {lat: 64.028809999999993, lng: -22.09701}, {lat: 64.031219, lng: -22.090379}, {lat: 64.0326, lng: -22.084929}, {lat: 64.03383, lng: -22.07902}, {lat: 64.03636, lng: -22.072749}, {lat: 64.03716, lng: -22.069589}, {lat: 64.039129, lng: -22.049219}, {lat: 64.039479, lng: -22.046409}, {lat: 64.040619, lng: -22.039899}, {lat: 64.047709, lng: -22.015329}, {lat: 64.04928, lng: -22.008329}, {lat: 64.05682, lng: -21.959069}, {lat: 64.058719, lng: -21.948969}, {lat: 64.059129, lng: -21.943989}, {lat: 64.059949, lng: -21.94061}, {lat: 64.06111, lng: -21.93902}, {lat: 64.06269, lng: -21.93838}, {lat: 64.066619, lng: -21.93743}, {lat: 64.06707, lng: -21.93719}, {lat: 64.06742, lng: -21.937569}, {lat: 64.073349, lng: -21.939399}, {lat: 64.07348, lng: -21.93929}, {lat: 64.074599, lng: -21.93575}, {lat: 64.075019, lng: -21.93182}, {lat: 64.07542, lng: -21.922009}, {lat: 64.07737, lng: -21.91208}, {lat: 64.080199, lng: -21.9018}, {lat: 64.082229, lng: -21.896299}, {lat: 64.083989, lng: -21.89364}, {lat: 64.085489, lng: -21.892549}, {lat: 64.08921, lng: -21.892009}, {lat: 64.090759, lng: -21.891579}, {lat: 64.09455, lng: -21.888579}, {lat: 64.097169, lng: -21.88536}, {lat: 64.100569, lng: -21.879709}, {lat: 64.102139, lng: -21.876299}, {lat: 64.1036, lng: -21.87202}, {lat: 64.10483, lng: -21.865659}, {lat: 64.105309, lng: -21.85815}, {lat: 64.105389, lng: -21.855929}, {lat: 64.10572, lng: -21.853229}, {lat: 64.105599, lng: -21.85236}, {lat: 64.10632, lng: -21.847959}, {lat: 64.106889, lng: -21.846909}, {lat: 64.110129, lng: -21.84378}, {lat: 64.11115, lng: -21.84351}, {lat: 64.11229, lng: -21.843109}, {lat: 64.112439, lng: -21.84089}, {lat: 64.1123, lng: -21.840639}, {lat: 64.112319, lng: -21.84035}, {lat: 64.11255, lng: -21.840389}, {lat: 64.112869, lng: -21.84035}, {lat: 64.113289, lng: -21.839789}, {lat: 64.11292, lng: -21.83579}, {lat: 64.11317, lng: -21.825649}, {lat: 64.113669, lng: -21.82261}, {lat: 64.115049, lng: -21.821159}, {lat: 64.117859, lng: -21.81505}, {lat: 64.12004, lng: -21.81263}, {lat: 64.121639, lng: -21.81166}, {lat: 64.123679, lng: -21.81137}, {lat: 64.123849, lng: -21.81057}, {lat: 64.124099, lng: -21.802139}, {lat: 64.124199, lng: -21.799669}, {lat: 64.12425, lng: -21.797009}, {lat: 64.124529, lng: -21.788439}, {lat: 64.125049, lng: -21.78436}, {lat: 64.125929, lng: -21.7802}, {lat: 64.13031, lng: -21.76819}, {lat: 64.131909, lng: -21.76468}, {lat: 64.134639, lng: -21.761209}, {lat: 64.13636, lng: -21.75975}, {lat: 64.138649, lng: -21.75838}, {lat: 64.1388, lng: -21.75803}, {lat: 64.13906, lng: -21.75783}, {lat: 64.13995, lng: -21.757539}, {lat: 64.14207, lng: -21.75601}, {lat: 64.143959, lng: -21.75381}, {lat: 64.14523, lng: -21.751799}, {lat: 64.1476, lng: -21.74677}, {lat: 64.15213, lng: -21.73904}, {lat: 64.153229, lng: -21.737669}, {lat: 64.153589, lng: -21.73694}, {lat: 64.15584, lng: -21.732349}, {lat: 64.158599, lng: -21.72491}, {lat: 64.158789, lng: -21.724149}, {lat: 64.16023, lng: -21.72069}, {lat: 64.16278, lng: -21.717479}, {lat: 64.16461, lng: -21.712479}, {lat: 64.164989, lng: -21.709879}, {lat: 64.16486, lng: -21.706869}, {lat: 64.16471, lng: -21.705219}, {lat: 64.16452, lng: -21.700819}, {lat: 64.16468, lng: -21.69586}, {lat: 64.165269, lng: -21.69347}, {lat: 64.16542, lng: -21.692659}, {lat: 64.16682, lng: -21.690879}, {lat: 64.1676, lng: -21.68779}, {lat: 64.167909, lng: -21.684239}, {lat: 64.167819, lng: -21.683539}, {lat: 64.16811, lng: -21.6834}, {lat: 64.17086, lng: -21.678789}, {lat: 64.17216, lng: -21.67726}, {lat: 64.174139, lng: -21.67645}, {lat: 64.17584, lng: -21.676779}, {lat: 64.17595, lng: -21.67657}, {lat: 64.17647, lng: -21.675189}, {lat: 64.176759, lng: -21.67489}, {lat: 64.178449, lng: -21.672099}, {lat: 64.178529, lng: -21.66814}, {lat: 64.179769, lng: -21.653849}, {lat: 64.1804, lng: -21.631749}, {lat: 64.18083, lng: -21.63185}, {lat: 64.181599, lng: -21.631909}, {lat: 64.182049, lng: -21.630169}, {lat: 64.180379, lng: -21.633649}, {lat: 64.17865, lng: -21.67023}, {lat: 64.176319, lng: -21.675469}, {lat: 64.17613, lng: -21.676599}, {lat: 64.17645, lng: -21.67682}, {lat: 64.18104, lng: -21.678859}, {lat: 64.182579, lng: -21.679769}, {lat: 64.1857, lng: -21.68358}, {lat: 64.18832, lng: -21.685799}, {lat: 64.19084, lng: -21.689249}, {lat: 64.196159, lng: -21.70262}, {lat: 64.198449, lng: -21.70676}, {lat: 64.199769, lng: -21.708019}, {lat: 64.20132, lng: -21.708529}, {lat: 64.202909, lng: -21.708089}, {lat: 64.20427, lng: -21.708039}, {lat: 64.20568, lng: -21.708899}, {lat: 64.2071, lng: -21.71105}, {lat: 64.20817, lng: -21.714439}, {lat: 64.208639, lng: -21.718979}, {lat: 64.208619, lng: -21.72046}, {lat: 64.20727, lng: -21.73273}, {lat: 64.2057, lng: -21.74599}, {lat: 64.20553, lng: -21.751309}, {lat: 64.20612, lng: -21.75582}, {lat: 64.20745, lng: -21.76019}, {lat: 64.21342, lng: -21.776049}, {lat: 64.220319, lng: -21.801249}, {lat: 64.22283, lng: -21.807999}, {lat: 64.224949, lng: -21.811599}, {lat: 64.227349, lng: -21.8142}, {lat: 64.232349, lng: -21.8176}, {lat: 64.235389, lng: -21.820209}, {lat: 64.23818, lng: -21.823699}, {lat: 64.24038, lng: -21.82699}, {lat: 64.242059, lng: -21.828889}, {lat: 64.243579, lng: -21.82965}, {lat: 64.25097, lng: -21.82971}, {lat: 64.253149, lng: -21.82982}, {lat: 64.25443, lng: -21.83032}, {lat: 64.258559, lng: -21.83255}, {lat: 64.265859, lng: -21.833729}, {lat: 64.269739, lng: -21.83483}, {lat: 64.27204, lng: -21.835929}, {lat: 64.273509, lng: -21.83737}, {lat: 64.275069, lng: -21.839519}, {lat: 64.27671, lng: -21.840559}, {lat: 64.278079, lng: -21.840549}, {lat: 64.28005, lng: -21.840119}, {lat: 64.280969, lng: -21.840289}, {lat: 64.28178, lng: -21.839949}, {lat: 64.28419, lng: -21.83578}, {lat: 64.28611, lng: -21.83378}, {lat: 64.28831, lng: -21.83457}, {lat: 64.289899, lng: -21.83787}, {lat: 64.306589, lng: -21.872509}, {lat: 64.307929, lng: -21.8739}, {lat: 64.31217, lng: -21.876919}, {lat: 64.313259, lng: -21.87968}, {lat: 64.3147, lng: -21.889879}, {lat: 64.314579, lng: -21.89433}, {lat: 64.31374, lng: -21.89706}, {lat: 64.30991, lng: -21.903429}, {lat: 64.30919, lng: -21.90478}, {lat: 64.30838, lng: -21.907019}, {lat: 64.308009, lng: -21.91101}, {lat: 64.30822, lng: -21.911769}, {lat: 64.308439, lng: -21.912129}, {lat: 64.30935, lng: -21.91136}, {lat: 64.310789, lng: -21.90795}, {lat: 64.31192, lng: -21.90392}, {lat: 64.313709, lng: -21.89417}, {lat: 64.31549, lng: -21.88897}, {lat: 64.31963, lng: -21.88336}, {lat: 64.32146, lng: -21.879989}, {lat: 64.32369, lng: -21.8739}, {lat: 64.325799, lng: -21.86781}, {lat: 64.32656, lng: -21.863469}, {lat: 64.327929, lng: -21.858139}, {lat: 64.33201, lng: -21.845839}, {lat: 64.335289, lng: -21.838099}, {lat: 64.337499, lng: -21.83218}, {lat: 64.34104, lng: -21.82211}, {lat: 64.34353, lng: -21.81771}, {lat: 64.3457, lng: -21.815119}, {lat: 64.350819, lng: -21.81058}, {lat: 64.354019, lng: -21.80672}, {lat: 64.35537, lng: -21.806149}, {lat: 64.35694, lng: -21.806439}, {lat: 64.35841, lng: -21.80768}, {lat: 64.360759, lng: -21.81175}, {lat: 64.36486, lng: -21.822229}, {lat: 64.36684, lng: -21.82717}, {lat: 64.37107, lng: -21.83518}, {lat: 64.375779, lng: -21.84789}, {lat: 64.377169, lng: -21.850299}, {lat: 64.378829, lng: -21.85167}, {lat: 64.380399, lng: -21.851799}, {lat: 64.38194, lng: -21.85087}, {lat: 64.384819, lng: -21.847149}, {lat: 64.38619, lng: -21.84651}, {lat: 64.38742, lng: -21.846899}, {lat: 64.38836, lng: -21.84774}, {lat: 64.389809, lng: -21.849419}, {lat: 64.39181, lng: -21.850569}, {lat: 64.393079, lng: -21.85202}, {lat: 64.39347, lng: -21.852769}, {lat: 64.394709, lng: -21.85669}, {lat: 64.397289, lng: -21.87239}, {lat: 64.399009, lng: -21.89318}, {lat: 64.401739, lng: -21.905779}, {lat: 64.40287, lng: -21.90838}, {lat: 64.405519, lng: -21.91196}, {lat: 64.407809, lng: -21.91445}, {lat: 64.41233, lng: -21.917909}, {lat: 64.414369, lng: -21.920689}, {lat: 64.41646, lng: -21.92496}, {lat: 64.4183, lng: -21.93086}, {lat: 64.42004, lng: -21.938459}, {lat: 64.422309, lng: -21.9441}, {lat: 64.424209, lng: -21.950809}, {lat: 64.42569, lng: -21.953979}, {lat: 64.42761, lng: -21.956009}, {lat: 64.4289, lng: -21.95649}, {lat: 64.453789, lng: -21.96035}, {lat: 64.464849, lng: -21.963459}, {lat: 64.468029, lng: -21.96475}, {lat: 64.470129, lng: -21.96491}, {lat: 64.47183, lng: -21.964159}, {lat: 64.482939, lng: -21.953789}, {lat: 64.491889, lng: -21.94535}, {lat: 64.49486, lng: -21.94172}, {lat: 64.49774, lng: -21.937119}, {lat: 64.50923, lng: -21.91776}, {lat: 64.50992, lng: -21.91629}, {lat: 64.51083, lng: -21.91319}, {lat: 64.51363, lng: -21.89513}, {lat: 64.51522, lng: -21.89082}, {lat: 64.51652, lng: -21.88873}, {lat: 64.51783, lng: -21.88873}, {lat: 64.51823, lng: -21.891944
}, ];
  route1 = new google.maps.Polyline({path: coors1, geodesic: true, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 4});
//* ==========================================================================================================
[/color]

//[b] End of Day 01[/b]


 
//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt

       
        //* poi  1
   Info1 = "R 10783- LDG0 IS,Hafnarskogur -Hafnarskogur Hotel(10)";
   InfoS1 = Info1.substr(0,12);
   InfoS1a = "10783 (10)";     
   PoiLoc1 = {lat: 64.51799, lng: -21.891955}; 
    //   icon: blue1
   Poi1 = new google.maps.Marker({position: PoiLoc1, map: map, icon: blue1, title: Info1 });   
   markers.push(Poi1);
   Poi1.addListener('click', function() {
   Baloon1.open(map, Poi1);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick1 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>R 10783- LDG0 IS,Hafnarskogur -Hafnarskogur Hotel(10)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon1 = new google.maps.InfoWindow({content: Info1});
    BaloonS1 = new google.maps.InfoWindow({content: InfoS1});
    BaloonS1a = new google.maps.InfoWindow({content: InfoS1a});



//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt

       
        //* poi  2
   Info2 = "R 10684- FOD10 IS,Borgarnes -Geirabakari Kaffihus Bakery(11)";
   InfoS2 = Info2.substr(0,12);
   InfoS2a = "10684 (11)";     
   PoiLoc2 = {lat: 64.541129, lng: -21.908083}; 
    //   icon: blue2
   Poi2 = new google.maps.Marker({position: PoiLoc2, map: map, icon: blue2, title: Info2 });   
   markers.push(Poi2);
   Poi2.addListener('click', function() {
   Baloon2.open(map, Poi2);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick2 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>R 10684- FOD10 IS,Borgarnes -Geirabakari Kaffihus Bakery(11)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon2 = new google.maps.InfoWindow({content: Info2});
    BaloonS2 = new google.maps.InfoWindow({content: InfoS2});
    BaloonS2a = new google.maps.InfoWindow({content: InfoS2a});



//* D:\aagon\data\Poi\Dropbox\HTA_template\GM4_POIs_Html.txt

       
        //* poi  3
   Info3 = "E 11861- LDG0 IS,Olafsv?k -Vio Hafid Guesthouse - Bed and Breakfast(12)";
   InfoS3 = Info3.substr(0,12);
   InfoS3a = "11861 (12)";     
   PoiLoc3 = {lat: 64.893611, lng: -23.703611}; 
    //   icon: blue3
   Poi3 = new google.maps.Marker({position: PoiLoc3, map: map, icon: blue3, title: Info3 });   
   markers.push(Poi3);
   Poi3.addListener('click', function() {
   Baloon3.open(map, Poi3);
  });

// sample with formatting & link 
// '<p><a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
//  'The Link title</a> </p>'+
//   var BaloonOnClick3 = '<div id="content">'+
//     '<div id="siteNotice">'+
//      '</div>'+
//      '<h1 id="firstHeading" class="firstHeading">Header</h1>'+
//      '<div id="bodyContent">'+
//      '<p><b>E 11861- LDG0 IS,Olafsv?k -Vio Hafid Guesthouse - Bed and Breakfast(12)</b></p>'+
//     '</div>'+
//      '</div>';
    Baloon3 = new google.maps.InfoWindow({content: Info3});
    BaloonS3 = new google.maps.InfoWindow({content: InfoS3});
    BaloonS3a = new google.maps.InfoWindow({content: InfoS3a});

//* ==========================================================================================================
//* GM4_multi_coordinates_Html.txt

//* route  2 - D:\aagon\data\Poi\Dropbox\Trips\I111\Day_02.txt     from 64.51823 -21.891944 to 64.893633 -23.703603


  var coors2 = [{lat: 64.51823, lng: -21.891944}, {lat: 64.518139, lng: -21.89021}, {lat: 64.51811, lng: -21.88721}, {lat: 64.519299, lng: -21.88661}, {lat: 64.52177, lng: -21.886309}, {lat: 64.522979, lng: -21.88583}, {lat: 64.526299, lng: -21.88363}, {lat: 64.527539, lng: -21.883599}, {lat: 64.529129, lng: -21.884369}, {lat: 64.53067, lng: -21.886119}, {lat: 64.53338, lng: -21.89172}, {lat: 64.53663, lng: -21.90039}, {lat: 64.538709, lng: -21.90506}, {lat: 64.54012, lng: -21.90688}, {lat: 64.539999, lng: -21.90801}, {lat: 64.540279, lng: -21.90837}, {lat: 64.541122, lng: -21.908132}, {lat: 64.54346, lng: -21.90994}, {lat: 64.543879, lng: -21.90908}, {lat: 64.544469, lng: -21.910069}, {lat: 64.5448, lng: -21.91038}, {lat: 64.54539, lng: -21.90994}, {lat: 64.54665, lng: -21.910019}, {lat: 64.54828, lng: -21.91068}, {lat: 64.549329, lng: -21.91013}, {lat: 64.55496, lng: -21.903939}, {lat: 64.556949, lng: -21.9005}, {lat: 64.559329, lng: -21.897879}, {lat: 64.559999, lng: -21.89731}, {lat: 64.56014, lng: -21.897109}, {lat: 64.56033, lng: -21.897459}, {lat: 64.56013, lng: -21.900009}, {lat: 64.560009, lng: -21.92349}, {lat: 64.56092, lng: -21.926429}, {lat: 64.563989, lng: -21.93208}, {lat: 64.567569, lng: -21.93813}, {lat: 64.573109, lng: -21.9521}, {lat: 64.575139, lng: -21.95655}, {lat: 64.577739, lng: -21.961199}, {lat: 64.58176, lng: -21.967839}, {lat: 64.58331, lng: -21.97288}, {lat: 64.584239, lng: -21.98069}, {lat: 64.58506, lng: -21.98247}, {lat: 64.58649, lng: -21.98362}, {lat: 64.58887, lng: -21.98395}, {lat: 64.590399, lng: -21.98535}, {lat: 64.591619, lng: -21.988289}, {lat: 64.5929, lng: -21.994189}, {lat: 64.59326, lng: -22.000239}, {lat: 64.59615, lng: -22.009559}, {lat: 64.601119, lng: -22.02251}, {lat: 64.601999, lng: -22.02574}, {lat: 64.603459, lng: -22.033839}, {lat: 64.605299, lng: -22.03969}, {lat: 64.606019, lng: -22.04348}, {lat: 64.606809, lng: -22.04603}, {lat: 64.6078, lng: -22.04744}, {lat: 64.60904, lng: -22.04787}, {lat: 64.611629, lng: -22.04688}, {lat: 64.612969, lng: -22.0475}, {lat: 64.61598, lng: -22.05041}, {lat: 64.617079, lng: -22.050789}, {lat: 64.619259, lng: -22.05101}, {lat: 64.62117, lng: -22.052459}, {lat: 64.62617, lng: -22.06014}, {lat: 64.628309, lng: -22.064509}, {lat: 64.62977, lng: -22.066499}, {lat: 64.6309, lng: -22.067229}, {lat: 64.634559, lng: -22.066879}, {lat: 64.639089, lng: -22.068079}, {lat: 64.64108, lng: -22.067929}, {lat: 64.64257, lng: -22.066939}, {lat: 64.64611, lng: -22.06386}, {lat: 64.64862, lng: -22.063099}, {lat: 64.65099, lng: -22.06376}, {lat: 64.65309, lng: -22.065219}, {lat: 64.6591, lng: -22.069169}, {lat: 64.667909, lng: -22.07035}, {lat: 64.67276, lng: -22.06991}, {lat: 64.67532, lng: -22.0714}, {lat: 64.68742, lng: -22.094259}, {lat: 64.69014, lng: -22.09878}, {lat: 64.69323, lng: -22.10543}, {lat: 64.69605, lng: -22.110859}, {lat: 64.69691, lng: -22.11588}, {lat: 64.69735, lng: -22.1251}, {lat: 64.699059, lng: -22.13362}, {lat: 64.701159, lng: -22.13923}, {lat: 64.70314, lng: -22.142259}, {lat: 64.705369, lng: -22.144109}, {lat: 64.7113, lng: -22.14821}, {lat: 64.712919, lng: -22.150419}, {lat: 64.721619, lng: -22.171499}, {lat: 64.723809, lng: -22.17437}, {lat: 64.728629, lng: -22.17867}, {lat: 64.729449, lng: -22.1796}, {lat: 64.73266, lng: -22.185119}, {lat: 64.73517, lng: -22.19172}, {lat: 64.73792, lng: -22.20044}, {lat: 64.740749, lng: -22.20973}, {lat: 64.741719, lng: -22.2173}, {lat: 64.743289, lng: -22.223359}, {lat: 64.74615, lng: -22.23098}, {lat: 64.74951, lng: -22.238379}, {lat: 64.763739, lng: -22.266059}, {lat: 64.76528, lng: -22.267019}, {lat: 64.78442, lng: -22.26671}, {lat: 64.79024, lng: -22.26635}, {lat: 64.81147, lng: -22.26229}, {lat: 64.813339, lng: -22.262509}, {lat: 64.81507, lng: -22.263649}, {lat: 64.82779, lng: -22.276759}, {lat: 64.829399, lng: -22.279219}, {lat: 64.835759, lng: -22.295539}, {lat: 64.840109, lng: -22.315449}, {lat: 64.843479, lng: -22.32673}, {lat: 64.846639, lng: -22.339959}, {lat: 64.84641, lng: -22.35052}, {lat: 64.84658, lng: -22.367149}, {lat: 64.84595, lng: -22.375219}, {lat: 64.845939, lng: -22.379719}, {lat: 64.846969, lng: -22.390069}, {lat: 64.847319, lng: -22.400619}, {lat: 64.846779, lng: -22.412729}, {lat: 64.845499, lng: -22.42347}, {lat: 64.843549, lng: -22.433529}, {lat: 64.842589, lng: -22.436149}, {lat: 64.836019, lng: -22.446609}, {lat: 64.83124, lng: -22.45753}, {lat: 64.826769, lng: -22.463969}, {lat: 64.82603, lng: -22.46612}, {lat: 64.824509, lng: -22.47516}, {lat: 64.823169, lng: -22.481709}, {lat: 64.82243, lng: -22.49053}, {lat: 64.82281, lng: -22.49398}, {lat: 64.826009, lng: -22.504439}, {lat: 64.827239, lng: -22.516119}, {lat: 64.828209, lng: -22.522119}, {lat: 64.834689, lng: -22.554059}, {lat: 64.8372, lng: -22.56447}, {lat: 64.84158, lng: -22.586359}, {lat: 64.842419, lng: -22.592489}, {lat: 64.8415, lng: -22.626829}, {lat: 64.84159, lng: -22.641199}, {lat: 64.84246, lng: -22.64927}, {lat: 64.843709, lng: -22.656409}, {lat: 64.846339, lng: -22.663149}, {lat: 64.84771, lng: -22.66775}, {lat: 64.84869, lng: -22.675989}, {lat: 64.848539, lng: -22.6834}, {lat: 64.850029, lng: -22.705029}, {lat: 64.85037, lng: -22.715469}, {lat: 64.849089, lng: -22.73238}, {lat: 64.84853, lng: -22.74328}, {lat: 64.84788, lng: -22.74694}, {lat: 64.8463, lng: -22.75186}, {lat: 64.838479, lng: -22.76953}, {lat: 64.83691, lng: -22.776379}, {lat: 64.83589, lng: -22.788349}, {lat: 64.83559, lng: -22.797199}, {lat: 64.835819, lng: -22.80785}, {lat: 64.834149, lng: -22.818609}, {lat: 64.834059, lng: -22.82384}, {lat: 64.836339, lng: -22.845129}, {lat: 64.835729, lng: -22.849889}, {lat: 64.834089, lng: -22.85625}, {lat: 64.832949, lng: -22.85933}, {lat: 64.83254, lng: -22.86256}, {lat: 64.8327, lng: -22.86529}, {lat: 64.835749, lng: -22.888399}, {lat: 64.835669, lng: -22.89379}, {lat: 64.83376, lng: -22.904569}, {lat: 64.833279, lng: -22.91135}, {lat: 64.833379, lng: -22.92341}, {lat: 64.83421, lng: -22.927099}, {lat: 64.83527, lng: -22.929319}, {lat: 64.838, lng: -22.933719}, {lat: 64.839329, lng: -22.938429}, {lat: 64.83815, lng: -22.95185}, {lat: 64.837069, lng: -22.963539}, {lat: 64.83624, lng: -22.966019}, {lat: 64.832479, lng: -22.974179}, {lat: 64.82947, lng: -22.97818}, {lat: 64.828369, lng: -22.97887}, {lat: 64.82596, lng: -22.97808}, {lat: 64.824609, lng: -22.97824}, {lat: 64.817229, lng: -22.98897}, {lat: 64.812469, lng: -22.99451}, {lat: 64.81119, lng: -22.9967}, {lat: 64.808189, lng: -23.00661}, {lat: 64.807309, lng: -23.01089}, {lat: 64.806609, lng: -23.019799}, {lat: 64.807559, lng: -23.036239}, {lat: 64.808019, lng: -23.050119}, {lat: 64.809209, lng: -23.087829}, {lat: 64.808869, lng: -23.09237}, {lat: 64.80683, lng: -23.10201}, {lat: 64.806599, lng: -23.105579}, {lat: 64.80736, lng: -23.10941}, {lat: 64.81245, lng: -23.12012}, {lat: 64.81332, lng: -23.12381}, {lat: 64.81373, lng: -23.128389}, {lat: 64.813709, lng: -23.134699}, {lat: 64.814669, lng: -23.14022}, {lat: 64.81602, lng: -23.156239}, {lat: 64.81666, lng: -23.16214}, {lat: 64.81927, lng: -23.17481}, {lat: 64.823349, lng: -23.20085}, {lat: 64.82488, lng: -23.218209}, {lat: 64.827919, lng: -23.228839}, {lat: 64.828619, lng: -23.23265}, {lat: 64.82866, lng: -23.24589}, {lat: 64.829319, lng: -23.253129}, {lat: 64.82918, lng: -23.260159}, {lat: 64.829959, lng: -23.273599}, {lat: 64.83069, lng: -23.27853}, {lat: 64.838189, lng: -23.30332}, {lat: 64.84054, lng: -23.31386}, {lat: 64.84448, lng: -23.36449}, {lat: 64.844789, lng: -23.375669}, {lat: 64.84367, lng: -23.389799}, {lat: 64.843019, lng: -23.393499}, {lat: 64.841959, lng: -23.39663}, {lat: 64.837769, lng: -23.405679}, {lat: 64.83738, lng: -23.40891}, {lat: 64.837759, lng: -23.412969}, {lat: 64.839329, lng: -23.41717}, {lat: 64.8398, lng: -23.41981}, {lat: 64.83973, lng: -23.4226}, {lat: 64.838979, lng: -23.425909}, {lat: 64.838879, lng: -23.429489}, {lat: 64.83947, lng: -23.433619}, {lat: 64.83902, lng: -23.437399}, {lat: 64.83737, lng: -23.440369}, {lat: 64.83633, lng: -23.442929}, {lat: 64.8357, lng: -23.44672}, {lat: 64.8357, lng: -23.451699}, {lat: 64.8364, lng: -23.456879}, {lat: 64.83761, lng: -23.46085}, {lat: 64.840389, lng: -23.468139999999998}, {lat: 64.84201, lng: -23.47519}, {lat: 64.842949, lng: -23.477429}, {lat: 64.84369, lng: -23.478019}, {lat: 64.845209, lng: -23.477609}, {lat: 64.84578, lng: -23.47763}, {lat: 64.8465, lng: -23.47816}, {lat: 64.84736, lng: -23.47999}, {lat: 64.84772, lng: -23.48255}, {lat: 64.847659, lng: -23.491619}, {lat: 64.848359, lng: -23.49723}, {lat: 64.85019, lng: -23.50344}, {lat: 64.85149, lng: -23.506739}, {lat: 64.85265, lng: -23.508389}, {lat: 64.85359, lng: -23.508919}, {lat: 64.855309, lng: -23.50855}, {lat: 64.856459, lng: -23.508739}, {lat: 64.85994, lng: -23.51249}, {lat: 64.861289, lng: -23.515419}, {lat: 64.861979, lng: -23.520769}, {lat: 64.86476, lng: -23.543499}, {lat: 64.86678, lng: -23.55086}, {lat: 64.866969, lng: -23.55394}, {lat: 64.86635, lng: -23.56271}, {lat: 64.86738, lng: -23.56814}, {lat: 64.86775, lng: -23.573169}, {lat: 64.86869, lng: -23.577729}, {lat: 64.87126, lng: -23.58343}, {lat: 64.87301, lng: -23.586009}, {lat: 64.874079, lng: -23.5865}, {lat: 64.876299, lng: -23.587929}, {lat: 64.87694, lng: -23.587839}, {lat: 64.87785, lng: -23.58677}, {lat: 64.87898, lng: -23.584489}, {lat: 64.87941, lng: -23.584619}, {lat: 64.881219, lng: -23.586609}, {lat: 64.8824, lng: -23.587039}, {lat: 64.882879, lng: -23.586899}, {lat: 64.88372, lng: -23.58542}, {lat: 64.884479, lng: -23.58527}, {lat: 64.885169, lng: -23.5865}, {lat: 64.88426, lng: -23.59748}, {lat: 64.884379, lng: -23.59974}, {lat: 64.885499, lng: -23.602439}, {lat: 64.88766, lng: -23.604269}, {lat: 64.88783, lng: -23.604419}, {lat: 64.88451, lng: -23.624179}, {lat: 64.88389, lng: -23.630519}, {lat: 64.88415, lng: -23.633689}, {lat: 64.885519, lng: -23.637539}, {lat: 64.886399, lng: -23.642899}, {lat: 64.88722, lng: -23.64879}, {lat: 64.88846, lng: -23.651239}, {lat: 64.889129, lng: -23.6518}, {lat: 64.89022, lng: -23.65432}, {lat: 64.89143, lng: -23.668009}, {lat: 64.89134, lng: -23.671859}, {lat: 64.891819, lng: -23.678079}, {lat: 64.89119, lng: -23.685719}, {lat: 64.89127, lng: -23.689409}, {lat: 64.89239, lng: -23.69858}, {lat: 64.893633, lng: -23.703603
}, ];
  route2 = new google.maps.Polyline({path: coors2, geodesic: true, strokeColor: "#0000FF", strokeOpacity: 1.0, strokeWeight: 4});
//* ==========================================================================================================
  addLine();
  }

  function ShowDayInfo() {
    BaloonDayinfo1.open(map,PoiDayinfo);
}

  function HideDayInfo() {
        BaloonDayinfo1.close();
}
 
  function addinfoNum() {
    BaloonS1a.open(map,Poi1);
    BaloonS2a.open(map,Poi2);
    BaloonS3a.open(map,Poi3);
      }
    function addinfo() {
    Baloon1.open(map,Poi1);
    Baloon2.open(map,Poi2);
    Baloon3.open(map,Poi3);
      }
function addinfos() {
         switch(InfoS1.substr(0,1))
      {   case "X":
            BaloonS1.open(map,Poi1);
            break;
      }
         switch(InfoS2.substr(0,1))
      {   case "X":
            BaloonS2.open(map,Poi2);
            break;
      }
         switch(InfoS3.substr(0,1))
      {   case "X":
            BaloonS3.open(map,Poi3);
            break;
      }
     }
    
    
function hidemarkers() {
   for (var i = 0; i < markers.length; i++) {
          markers[i].setMap(null);
        }
}

function showmarkers() {
   for (var i = 0; i < markers.length; i++) {
          markers[i].setMap(map);
        }
}
function hideinfo() {
        Baloon1.close();
      BaloonS1.close();
      BaloonS1a.close();
        Baloon2.close();
      BaloonS2.close();
      BaloonS2a.close();
        Baloon3.close();
      BaloonS3.close();
      BaloonS3a.close();
       
      }

   function addLine() {
        route1.setMap(map);
        route2.setMap(map);
        route3.setMap(map);
        }

  function removeLine() {
        route1.setMap(null);
        route2.setMap(null);
        route3.setMap(null);
      }

    </script>
    <script async defer
        src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBG-NGwbA0_SCMNWGBhIBmAKk7uFTUVR8k&signed_in=true&callback=initMap">
  </script>
  </body>
</html>

Avatar de Usuario

gonen

  • Mensajes: 1
  • Registrado: Mar Abr 17, 2018 2:53 pm


+ Publicar una respuesta

Página 1 de 1