Announcement

Collapse
No announcement yet.

How to provide current data from PBWIN app running locally to a browser.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to provide current data from PBWIN app running locally to a browser.

    My PBwin app calculates a current list of data points to be displayed on a google map.


    var newStores = [
    [" 37", 34.7281600, -86.5866234, 13, "<p>BURTON<br>308 FOUNTAIN CIR.<br>(256) 508-1333</p>"],
    [" 84", 34.6946010, -86.5836030, 14, "<p>MELISSA<br>3508 SW MEMORIAL PK<br>(256) 603-0098</p>"],
    [" 61", 34.7210460, -86.5817990, 15, "<p>HHM<br>101 SIVLEY<br>(256) 265-6644</p>"],
    [" 63", 34.7489534, -86.5994874, 16, "<p>HSV PEDIATRIC<br>1963 NW MEMORIAL PK<br>(256) 265-2464</p>"],
    [" 64", 34.7115141, -86.5822038, 17, "<p>LAURA<br>2641 BONITA CIR.<br>(256) 426-2807</p>"],
    [" 65", 34.6948640, -86.5791500, 18, "<p>DR WEEKS<br>4032 BALMORAL DR<br>(256) 883-4032</p>"],
    [" 66", 34.7233236, -86.5841070, 19, "<p>STEPHANIE<br>320 PELHAM AVE.<br>(256) 759-9269</p>"],
    [" 69", 34.7206287, -86.5818876, 20, "<p>H H DIABETES CL<br>201 SIVLEY RD.<br>(256) 265-0780</p>"],
    [" 74", 34.7106670, -86.5646100, 21, "<p>LOWERY<br>2706 DOWNING ST.<br>(256) 883-8419</p>"],
    [" 85", 34.7210460, -86.5817990, 22, "<p>ROWENA<br>101 SIVLEY RD.<br>(256) 265-6639</p>"]
    ];


    I need to be able to provide the new list of news stores periodically to the browser running a web page that has a timer running that gets the new list every 15 seconds.

    I was writing a new hiddenframe.html file, but for security reasons that does not work in the our home grown browser that we now use on old XP systems.

    HTML5 has some local file reading commands but you have to use input type file and select the file. For some reason your cannot specify a file name.

    Looking for an simple solutions, Maybe I have no choice but to store the data in a DB.

    I thought about trying to use TCP Server, not sure HTML5/JavaScript supports opening a TCP port?

    Doug

    Last edited by Douglas Martin; 14 Nov 2017, 12:35 PM.

  • #2
    You don't say with what you are having difficulty (code not shown): you have a timer issue, a HTML reading issue, a data collection issue, etc etc etc

    But let's first try this: Looks like you are building the HTML, so instead refreshing a page, why not just delete the old page and a display a new page?

    Michael Mattias
    Tal Systems Inc.
    Racine WI USA
    mmattias@talsystems.com
    http://www.talsystems.com

    Comment


    • #3
      Here is the HTML and Javascript that the browser is executing Maybe this code can be changed to keep the page from refreshing completely somehow . The current PB program rewrites this entire HTML with Function Init Var New stores changed to reflect the new list of stores to be shown on the map. There already is logic to determine if the pins are already on the map. It is possible the user has clicked on one of the pins and zoomed in. When the browser refreshes the map jumps back to its original state with the store in the center losing the zoomed into location. Not very user friendly. Maybe the onload="init(); can somehow be changed. Seem like I should post this on Stack overflow and gets some JavaScript advice. I tried to write the new list of store in a local file and have the HTML read the local file. Not possible according to Stack Overflow security issue.

      Code:
      &lt;!DOCTYPE html&gt;
      &lt;html&gt;
        &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta http-equiv="cache-control" control="no-cache" /&gt;
          &lt;title&gt;All to be delivered order locations&lt;/title&gt;
       &lt;style type="text/css"&gt;
      .labels {
          color: black;
          background-color: white;
          font-family:"Lucida Grande", "Arial", sans-serif;
          font-size: 12px;
           text-align: center;
           width: 28px;
           border: 1px solid black;
           white-space: nowrap;
      }
      .hiddenFrame {display:none;}
       &lt;/style&gt;
       &lt;style type="text/css"&gt;
      .storelabels {
          color: black;
          background-color: white;
          font-family:"Lucida Grande", "Arial", sans-serif;
          font-size: 12px;
           text-align: center;
           width: 28px;
           border: 1px solid black;
           white-space: nowrap;
      }
       &lt;/style&gt;
          &lt;style&gt;
            html, body, #map-canvas {
              height: 100%;
              margin: 0px;
              padding: 0px
            }
            #panel {
              position: absolute;
              top: 5px;
              left: 50%;
              margin-left: -180px;
              z-index: 5;
              background-color: #fff;
              padding: 5px;
              border: 1px solid #999;
            }
          &lt;/style&gt;
          &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"&gt;&lt;/script&gt;    
          &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.26&amp;key=AIzaSyCOfu3Th4jwW6iR3Zw-Rzyx36uW7tGSu0c&amp;sensor=false&amp;region=us"&gt;&lt;/script&gt;
          &lt;script&gt;
      // If you're adding a number of markers, you may want to
      // drop them on the map consecutively rather than all at once.
      // This example shows how to use setTimeout() to space
      // your markers' animation.
      
      // Start of AddMarkerWithlabel.JS
      eval(function(p,a,c,k,e,r){e=function(c){return(c&lt;a?'':e(parseInt(c/a)))+((c=c%a)&gt;35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 1G(b,a){6 1u(){}1u.v=a.v;b.2B=a.v;b.v=1b 1u();b.v.3h=b}6 u(c,b,a){2.3=c;2.1L=c.2y;2.7=K.1A("2k");2.7.4.S="11: 1p; 15: 1P;";2.q=K.1A("2k");2.q.4.S=2.7.4.S;2.q.1M("2A","1d A;");2.q.1M("2w","1d A;");2.U=u.P(b)}1G(u,8.5.3g);u.P=6(b){t a;9(C u.P.1j==="B"){a=K.1A("30");a.4.S="11: 1p; z-2Y: 2W; M: 13;";a.4.1l="-2P";a.4.1x="-2M";a.2I=b;u.P.1j=a}1d u.P.1j};u.v.2D=6(){t g=2;t m=A;t c=A;t f;t j,1e;t p;t d;t h;t o;t n=20;t i="3p("+2.1L+")";t k=6(e){9(e.2q){e.2q()}e.3l=F;9(e.2n){e.2n()}};t l=6(){g.3.2m(3c)};2.1E().1J.Y(2.7);2.1E().36.Y(2.q);9(C u.P.2e==="B"){2.1E().1J.Y(2.U);u.P.2e=F}2.1t=[8.5.r.O(2.q,"2c",6(e){9(g.3.R()||g.3.X()){2.4.19="25";8.5.r.D(g.3,"2c",e)}}),8.5.r.O(2.q,"21",6(e){9((g.3.R()||g.3.X())&amp;&amp;!c){2.4.19=g.3.2V();8.5.r.D(g.3,"21",e)}}),8.5.r.O(2.q,"1X",6(e){c=A;9(g.3.R()){m=F;2.4.19=i}9(g.3.R()||g.3.X()){8.5.r.D(g.3,"1X",e);k(e)}}),8.5.r.O(K,"1s",6(a){t b;9(m){m=A;g.q.4.19="25";8.5.r.D(g.3,"1s",a)}9(c){9(d){b=g.Z().1v(g.3.Q());b.y+=n;g.3.J(g.Z().1S(b));2O{g.3.2m(8.5.2N.2L);2J(l,2H)}2E(e){}}g.U.4.M="13";g.3.12(f);p=F;c=A;a.L=g.3.Q();8.5.r.D(g.3,"1N",a)}}),8.5.r.w(g.3.1g(),"2C",6(a){t b;9(m){9(c){a.L=1b 8.5.2z(a.L.1f()-j,a.L.1i()-1e);b=g.Z().1v(a.L);9(d){g.U.4.14=b.x+"G";g.U.4.T=b.y+"G";g.U.4.M="";b.y-=n}g.3.J(g.Z().1S(b));9(d){g.q.4.T=(b.y+n)+"G"}8.5.r.D(g.3,"1K",a)}V{j=a.L.1f()-g.3.Q().1f();1e=a.L.1i()-g.3.Q().1i();f=g.3.1c();h=g.3.Q();o=g.3.1g().2x();d=g.3.E("16");c=F;g.3.12(1I);a.L=g.3.Q();8.5.r.D(g.3,"1H",a)}}}),8.5.r.O(K,"2v",6(e){9(c){9(e.3r===27){d=A;g.3.J(h);g.3.1g().3q(o);8.5.r.D(K,"1s",e)}}}),8.5.r.O(2.q,"2u",6(e){9(g.3.R()||g.3.X()){9(p){p=A}V{8.5.r.D(g.3,"2u",e);k(e)}}}),8.5.r.O(2.q,"2s",6(e){9(g.3.R()||g.3.X()){8.5.r.D(g.3,"2s",e);k(e)}}),8.5.r.w(2.3,"1H",6(a){9(!c){d=2.E("16")}}),8.5.r.w(2.3,"1K",6(a){9(!c){9(d){g.J(n);g.7.4.N=1I+(2.E("17")?-1:+1)}}}),8.5.r.w(2.3,"1N",6(a){9(!c){9(d){g.J(0)}}}),8.5.r.w(2.3,"3o",6(){g.J()}),8.5.r.w(2.3,"3n",6(){g.12()}),8.5.r.w(2.3,"3m",6(){g.18()}),8.5.r.w(2.3,"3j",6(){g.18()}),8.5.r.w(2.3,"3i",6(){g.1C()}),8.5.r.w(2.3,"3f",6(){g.1y()}),8.5.r.w(2.3,"3e",6(){g.1z()}),8.5.r.w(2.3,"3d",6(){g.1a()}),8.5.r.w(2.3,"3b",6(){g.1a()})]};u.v.3a=6(){t i;2.7.2j.2i(2.7);2.q.2j.2i(2.q);2h(i=0;i&lt;2.1t.39;i++){8.5.r.38(2.1t[i])}};u.v.37=6(){2.1y();2.1C();2.1a()};u.v.1y=6(){t a=2.3.E("1w");9(C a.35==="B"){2.7.W=a;2.q.W=2.7.W}V{2.7.W="";2.7.Y(a);a=a.34(F);2.q.W="";2.q.Y(a)}};u.v.1C=6(){2.q.33=2.3.32()||""};u.v.1a=6(){t i,I;2.7.1r=2.3.E("1q");2.q.1r=2.7.1r;2.7.4.S="";2.q.4.S="";I=2.3.E("I");2h(i 31 I){9(I.2Z(i)){2.7.4[i]=I[i];2.q.4[i]=I[i]}}2.2b()};u.v.2b=6(){2.7.4.11="1p";2.7.4.15="1P";9(C 2.7.4.H!=="B"&amp;&amp;2.7.4.H!==""){2.7.4.2a="\\"29:28.26.2f(H="+(2.7.4.H*24)+")\\"";2.7.4.23="22(H="+(2.7.4.H*24)+")"}2.q.4.11=2.7.4.11;2.q.4.15=2.7.4.15;2.q.4.H=0.2X;2.q.4.2a="\\"29:28.26.2f(H=1)\\"";2.q.4.23="22(H=1)";2.1z();2.J();2.18()};u.v.1z=6(){t a=2.3.E("1o");2.7.4.1l=-a.x+"G";2.7.4.1x=-a.y+"G";2.q.4.1l=-a.x+"G";2.q.4.1x=-a.y+"G"};u.v.J=6(a){t b=2.Z().1v(2.3.Q());9(C a==="B"){a=0}2.7.4.14=1Z.1Y(b.x)+"G";2.7.4.T=1Z.1Y(b.y-a)+"G";2.q.4.14=2.7.4.14;2.q.4.T=2.7.4.T;2.12()};u.v.12=6(){t a=(2.3.E("17")?-1:+1);9(C 2.3.1c()==="B"){2.7.4.N=2U(2.7.4.T,10)+a;2.q.4.N=2.7.4.N}V{2.7.4.N=2.3.1c()+a;2.q.4.N=2.7.4.N}};u.v.18=6(){9(2.3.E("1n")){2.7.4.M=2.3.2T()?"2S":"13"}V{2.7.4.M="13"}2.q.4.M=2.7.4.M};6 1m(a){a=a||{};a.1w=a.1w||"";a.1o=a.1o||1b 8.5.2R(0,0);a.1q=a.1q||"2Q";a.I=a.I||{};a.17=a.17||A;9(C a.1n==="B"){a.1n=F}9(C a.16==="B"){a.16=F}9(C a.2d==="B"){a.2d=F}9(C a.1W==="B"){a.1W=A}9(C a.1B==="B"){a.1B=A}a.1k=a.1k||"1V"+(K.1U.1T==="2g:"?"s":"")+"://5.1R.1Q/2t/2l/2o/2K.3k";a.1F=a.1F||"1V"+(K.1U.1T==="2g:"?"s":"")+"://5.1R.1Q/2t/2l/2o/2G.2F";a.1B=A;2.2p=1b u(2,a.1k,a.1F);8.5.1D.1O(2,2r)}1G(1m,8.5.1D);1m.v.1h=6(a){8.5.1D.v.1h.1O(2,2r);2.2p.1h(a)};',62,214,'||this|marker_|style|maps|function|labelDiv_|google|if|||||||||||||||||eventDiv_|event||var|MarkerLabel_|prototype|addListener||||false|undefined|typeof|trigger|get|true|px|opacity|labelStyle|setPosition|document|latLng|display|zIndex|addDomListener|getSharedCross|getPosition|getDraggable|cssText|top|crossDiv_|else|innerHTML|getClickable|appendChild|getProjection||position|setZIndex|none|left|overflow|raiseOnDrag|labelInBackground|setVisible|cursor|setStyles|new|getZIndex|return|cLngOffset|lat|getMap|setMap|lng|crossDiv|crossImage|marginLeft|MarkerWithLabel|labelVisible|labelAnchor|absolute|labelClass|className|mouseup|listeners_|tempCtor|fromLatLngToDivPixel|labelContent|marginTop|setContent|setAnchor|createElement|optimized|setTitle|Marker|getPanes|handCursor|inherits|dragstart|1000000|overlayImage|drag|handCursorURL_|setAttribute|dragend|apply|hidden|com|gstatic|fromDivPixelToLatLng|protocol|location|http|draggable|mousedown|round|Math||mouseout|alpha|filter|100|pointer|Microsoft||DXImageTransform|progid|MsFilter|setMandatoryStyles|mouseover|clickable|processed|Alpha|https|for|removeChild|parentNode|div|en_us|setAnimation|stopPropagation|mapfiles|label|preventDefault|arguments|dblclick|intl|click|keydown|ondragstart|getCenter|handCursorURL|LatLng|onselectstart|superClass_|mousemove|onAdd|catch|cur|closedhand_8_8|1406|src|setTimeout|drag_cross_67_16|BOUNCE|9px|Animation|try|8px|markerLabels|Point|block|getVisible|parseInt|getCursor|1000002|01|index|hasOwnProperty|img|in|getTitle|title|cloneNode|nodeType|overlayMouseTarget|draw|removeListener|length|onRemove|labelstyle_changed|null|labelclass_changed|labelanchor_changed|labelcontent_changed|OverlayView|constructor|title_changed|labelvisible_changed|png|cancelBubble|visible_changed|zindex_changed|position_changed|url|setCenter|keyCode'.split('|'),0,{}))
      // End of AddMarkerWithlabel.JS
      
      var store = new google.maps.LatLng(34.7183560, -86.5780140);
      var lblStoreAnchor = new google.maps.Point(14, 36);
      var lblAnchor = new google.maps.Point(15, 39);
      
      
      var markers = [];
      var mapGeneration = 0;        //*Incremented each refresh
      
      var storeimage = {
          url: 'http://maps.gstatic.com/mapfiles/markers2/arrow.png',
          // This marker is 20 pixels wide by 32 pixels tall.
          size: new google.maps.Size(24, 32),
          // The origin for this image is 0,0.
          origin: new google.maps.Point(0,0),
          // The anchor for this image is the base at 0,32.
          anchor: new google.maps.Point(12, 32)
        };
      
      var map = null;
      var infowindow = null;
      var chicago = {lat: 41.85, lng: -87.65};
      
      /**
       * The CenterControl adds a control to the map that recenters the map on
       * Chicago.
       * This constructor takes the control DIV as an argument.
       * @constructor
       */
      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 Chicago.
        controlUI.addEventListener('click', function() {
          map.panTo(store);
          map.setZoom(14);    
        });
      
      }
      
      //* Instance exists for each marker on the map display
      function myMarker( lbl, mkr )
      {    this.marker= mkr;        //Map location
          this.label    = lbl;        //label to display on map
          this.generation = mapGeneration;
      }
      
      
      function initialize() {
      /* alert("initialize"); */
        var mapOptions = {
          zoom: 14,
          disableDefaultUI:true,
          panControl:true,
          zoomControl:true,
          mapTypeControl:false,
          scaleControl:true,
          streetViewControl:false,
          overviewMapControl:true,
          rotateControl:false,
          center: store
        };
      
        map = new google.maps.Map(document.getElementById('map-canvas'),
                mapOptions);
      
        // Create the DIV to hold the control and call the CenterControl()
        // constructor passing in this DIV.
        var centerControlDiv = document.createElement('div');
        var centerControl = new CenterControl(centerControlDiv, map);
      
        centerControlDiv.index = 1;
        map.controls[google.maps.ControlPosition.TOP_LEFT].push(centerControlDiv);
      
      
      var marker = new MarkerWithLabel({
          map: map,
          icon: storeimage,
          position: store,
          labelContent: "store",
          labelAnchor: lblStoreAnchor,
          labelClass: "storelabels",
          labelInBackground: false
        });
          for (var i in markers)
          {    markers[i].marker.setMap(map);
          }
      
       infowindow = new google.maps.InfoWindow({content: "loading..."});
      
      /* alert("leaving initialize"); */
      }
      
      
      function dropReload( newStores )
      {    var st  = null;
          var lbl = null;
          var mkr = null;
          var pt = null;
      
          mapGeneration++;        //*Incr generation of display
          for (var i in newStores)
          {    st = newStores[i];
              lbl = st[0];
              if (markers[lbl])
              {    markers[lbl].generation = mapGeneration;
                          //*Mark object as still on display
              } else
              {    pt = new google.maps.LatLng(st[1] ,st[2]);
                  mkr = new MarkerWithLabel(
                  {    map: map,
                      position: pt,
                      labelContent: lbl,
                      labelAnchor: lblAnchor,
                      labelClass: "labels",
                      labelInBackground: false,
                      html: st[4]
                  });
                  mkr.setMap(map);
                  markers[lbl] = new myMarker( lbl, mkr );
                  var contentString = "Some content";
                  google.maps.event.addListener(mkr, "click", function () {
                      infowindow.setContent(this.html);
                      infowindow.open(map, this);  
                      map.setZoom(16);
                      map.panTo(this.position);
              });
      
      
              };
          }
          for (var i in markers)
          {    if (markers[i].generation &lt; mapGeneration)
              {    markers[i].marker.setMap(null);
                  delete markers[i];
              }
          }
      }
      
      google.maps.event.addDomListener(window, 'load', initialize);
      
      
      function    init()
      {
      var newStores = [
          ["  77", 34.7501428, -86.5596351,  1, "&lt;p&gt;KEITRA CRATON&lt;br&gt;2006 REUBEN DR.&lt;br&gt;(251) 359-4090&lt;/p&gt;"],
      ["  75", 34.7207860, -86.5783857,  2, "&lt;p&gt;HEART CENTER&lt;br&gt;930 FRANKLIN ST.&lt;br&gt;(256) 519-8123&lt;/p&gt;"],
      ["  79", 34.7453680, -86.5959850,  3, "&lt;p&gt;LATONYA&lt;br&gt;1112 CHURCH ST. NW&lt;br&gt;(256) 704-6553&lt;/p&gt;"],
      ["   9", 34.7221369, -86.5826304,  4, "&lt;p&gt;NEW TWICKENHAM&lt;br&gt;720 GALLATIN ST.&lt;br&gt;(256) 265-8090&lt;/p&gt;"],
      ["  13", 34.7272905, -86.5860313,  5, "&lt;p&gt;SIROTE PERMUTT&lt;br&gt;305 CHURCH ST. SW&lt;br&gt;(256) 536-1711&lt;/p&gt;"],
      ["  18", 34.7092310, -86.5867734,  6, "&lt;p&gt;COLOR COMP&lt;br&gt;805 REGAL DR.&lt;br&gt;(256) 539-6200&lt;/p&gt;"],
      ["  76", 34.7254759, -86.5861231,  7, "&lt;p&gt;STACY&lt;br&gt;303 WILLIAMS AVE.&lt;br&gt;(256) 533-7040&lt;/p&gt;"],
      ["  24", 34.7350771, -86.5858347,  8, "&lt;p&gt;IBERIA BANK&lt;br&gt;400 MERIDIAN ST.&lt;br&gt;(256) 519-4334&lt;/p&gt;"],
      ["  81", 34.7655167, -86.5712629,  9, "&lt;p&gt;MLK ELEMENTARY&lt;br&gt;3112 MERIDIAN ST.&lt;br&gt;(256) 428-7100&lt;/p&gt;"],
      ["  68", 34.7394990, -86.5760780,  10, "&lt;p&gt;C.P.A.&lt;br&gt;704 WARD AVE.&lt;br&gt;(256) 533-1113&lt;/p&gt;"],
      ["  73", 34.7214357, -86.5918399,  11, "&lt;p&gt;DANA&lt;br&gt;1963 SW MEMORIAL PK&lt;br&gt;(256) 265-2286&lt;/p&gt;"],
      ["  72", 34.6971731, -86.5675893,  12, "&lt;p&gt;SMILES BY DESIG&lt;br&gt;4601 WHITESBURG DR.&lt;br&gt;(256) 533-1611&lt;/p&gt;"],
      ["  36", 34.7307814, -86.5844462,  13, "&lt;p&gt;EMERSON&lt;br&gt;207 EAST SIDE SQUAR&lt;br&gt;(256) 327-8777&lt;/p&gt;"],
      ["  37", 34.7281600, -86.5866234,  14, "&lt;p&gt;BURTON&lt;br&gt;308 FOUNTAIN CIR.&lt;br&gt;(256) 508-1333&lt;/p&gt;"],
      ["  84", 34.6946010, -86.5836030,  15, "&lt;p&gt;MELISSA&lt;br&gt;3508 SW MEMORIAL PK&lt;br&gt;(256) 603-0098&lt;/p&gt;"],
      ["  61", 34.7210460, -86.5817990,  16, "&lt;p&gt;HHM&lt;br&gt;101 SIVLEY&lt;br&gt;(256) 265-6644&lt;/p&gt;"],
      ["  63", 34.7489534, -86.5994874,  17, "&lt;p&gt;HSV PEDIATRIC&lt;br&gt;1963 NW MEMORIAL PK&lt;br&gt;(256) 265-2464&lt;/p&gt;"],
      ["  64", 34.7115141, -86.5822038,  18, "&lt;p&gt;LAURA&lt;br&gt;2641 BONITA CIR.&lt;br&gt;(256) 426-2807&lt;/p&gt;"],
      ["  65", 34.6948640, -86.5791500,  19, "&lt;p&gt;DR WEEKS&lt;br&gt;4032 BALMORAL DR&lt;br&gt;(256) 883-4032&lt;/p&gt;"],
      ["  66", 34.7233236, -86.5841070,  20, "&lt;p&gt;STEPHANIE&lt;br&gt;320 PELHAM AVE.&lt;br&gt;(256) 759-9269&lt;/p&gt;"],
      ["  69", 34.7206287, -86.5818876,  21, "&lt;p&gt;H H DIABETES CL&lt;br&gt;201 SIVLEY RD.&lt;br&gt;(256) 265-0780&lt;/p&gt;"],
      ["  74", 34.7106670, -86.5646100,  22, "&lt;p&gt;LOWERY&lt;br&gt;2706 DOWNING ST.&lt;br&gt;(256) 883-8419&lt;/p&gt;"],
      ["  85", 34.7210460, -86.5817990,  23, "&lt;p&gt;ROWENA&lt;br&gt;101 SIVLEY RD.&lt;br&gt;(256) 265-6639&lt;/p&gt;"]
          ];
          parent.dropReload( newStores);
          setTimeout(function() {
           window.location.reload();
          }, 10000);
      
      };
      
      
      
      
          &lt;/script&gt;
        &lt;/head&gt;
        &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"&gt;  
        &lt;body onload="init();"&gt;
          &lt;div id="map-canvas"&gt;&lt;/div&gt;
      
        &lt;/body&gt;
      &lt;/html&gt;

      Comment


      • #4
        Function Init Var New stores changed to reflect the new list of stores to be shown on the map. There already is logic to determine if the pins are already on the map.
        Well, don't rewrite it all. Make a 'source data file' with a section "var newstores " to read as some replaceable token and just replace it with one line of code.

        Frankly, I don't see your problem here at this volume.

        What would be so wrong about "replace all with new list" followed by "Draw the page" ???

        (Disclaimer for above : Code not shown)

        Come to think of it....
        Looking for an simple solutions,
        Solutions to what? Just what issue (performance, resource usage, maintainability, some of above, all of above, other) are you trying to address?

        MCM
        Michael Mattias
        Tal Systems Inc.
        Racine WI USA
        mmattias@talsystems.com
        http://www.talsystems.com

        Comment

        Working...
        X