title: how to addMarker from google sheet to google app script
body: <p>i have two column in google sheet , that contain latitude and longitude,
  i use below foramt:</p>
  
  <pre><code>var map=Maps.newStaticMap().setLanguage('en')
        .beginPath()
        .addMarker(lat, long)
        .addMarker(lat1, long1)
        .addMarker(lat2, long2)
        .addMarker(lat3, long3)
        .endPath().getAs('image/jpeg');
  </code></pre>
  
  <p>i want to add multi addmarker from reading google sheet,</p>
  
  <p>i used this code in google script:</p>
  
  <pre><code>var app=SpreadsheetApp
  var ss= app.openById("1dNw5loVnxpBysrYC9t49vc5LRkOytSP23Blo-ny_oM");
  var sheet2=ss.getSheetByName('Sheet2');
  var lastRow2= sheet2.getLastRow();
  var numRow=lastRow2-7;
  var marker= "";
  for (var i=8;i&lt;=lastRow2;i++){
  marker=marker+".addMarker("+sheet2.getRange(i,1).getValue()+","+ sheet2.getRange(i,2).getValue()+")";
  }
  marker=marker+".";
  
  var map=Maps.newStaticMap().setLanguage('en').beginPath()+marker+endPath().getAs('image/jpeg');
  </code></pre>
  
  <p>marker output is this:</p>
  
  <pre><code>.addMarker(32.645814,51.669745).addMarker(32.646284,51.66835).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.647468,51.665443).addMarker(32.650087,51.665625).addMarker(32.652779,51.665893).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653493,51.66599).addMarker(32.653899,51.664413).addMarker(32.654812,51.665571).addMarker(32.656347,51.665582).addMarker(32.656808,51.66202).addMarker(32.656916,51.660207).addMarker(32.660204,51.660572).addMarker(32.663049,51.661119).addMarker(32.663302,51.661666).addMarker(32.663302,51.661666).addMarker(32.663302,51.661666).
  </code></pre>
  
  <p>it work when i copy past marker output manuly in map variable:</p>
  
  <pre><code>var map=Maps.newStaticMap().setLanguage('en').setMarkerStyle(Maps.StaticMap.MarkerSize.TINY, Maps.StaticMap.Color.RED , '1').beginPath().addMarker(32.645814,51.669745).addMarker(32.646284,51.66835).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.645769,51.665775).addMarker(32.647468,51.665443).addMarker(32.650087,51.665625).addMarker(32.652779,51.665893).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653032,51.665389).addMarker(32.653493,51.66599).addMarker(32.653899,51.664413).addMarker(32.654812,51.665571).addMarker(32.656347,51.665582).addMarker(32.656808,51.66202).addMarker(32.656916,51.660207).addMarker(32.660204,51.660572).addMarker(32.663049,51.661119).addMarker(32.663302,51.661666).addMarker(32.663302,51.661666).addMarker(32.663302,51.661666).endPath().getAs('image/jpeg');
  </code></pre>
  
  <p>bu it dont work when i use this form:</p>
  
  <pre><code>var map=Maps.newStaticMap().setLanguage('en').beginPath()+marker+endPath().getAs('image/jpeg');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/oWrRu.png" rel="nofollow noreferrer">image of my google sheet</a></p>