title: Variable Polyline Weight with GEOJSON in Leaflet
body: <p><strong>Here is the entire HTML document:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Top 5 Importers of Tungsten&lt;/title&gt;
  
      &lt;!--Imports stylesheet from Leaflet --&gt; 
      &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" /&gt;
       &lt;!-- Import jQuery, a common JavaScript library providing hundreds of functions --&gt;
      &lt;script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  
      &lt;style&gt;
          @font-face {
              font-family: Planewalker;
              src: url('https://dl.dropboxusercontent.com/s/3hn6zi8ez2vf4d7/Planewalker.ttf');
          }
  
          a:link{text-decoration: none;color:#0000FF;}
          a:visited{text-decoration:none;color:#0000FF;}
          a:hover{color:#990000;text-decoration:none;}
  
          #map {
              width: 1200px;
              height: 600px;
              border: black solid 2px;
              display: block;
              margin-left: auto;
              margin-right: auto;
          }
  
          #map2 {
              width: 1000px;
              height: 550px;
              border: black solid 2px;
              display: block;
              margin-left: auto;
              margin-right: auto;
          }
  
          #map3 {
              width: 1000px;
              height: 550px;
              border: black solid 2px;
              display: block;
              margin-right: auto;
              margin-left: auto;
          }
  
          .info {
              padding: 6px 8px;
              font: 14px/16px Arial, Helvetica, sans-serif;
              background: white;
              background: rgba(255,255,255,0.8);
              box-shadow: 0 0 15px rgba(0,0,0,0.2);
              border-radius: 5px;
          }
  
          .info h4 {
              margin: 0 0 5px;
              color: #777;
          }
  
          .legend {
              text-align: left;
              line-height: 18px;
              color: #555;
          }
  
          .legend i {
              width: 18px;
              height: 18px;
              float: left;
              margin-right: 8px;
              opacity: 0.7;
          }
  
          #header{
              width:450px;
              border-radius:15px;
              background-image: url(https://dl.dropboxusercontent.com/s/j1ii4yz5qftrks7/greyscale-natural-grunge-textures-6.jpg);
              margin: auto;
              margin-bottom: 5px;
              text-align: center;
              border: black solid 2px; 
              font-size: 40px;
              padding-top: 7px;
              padding-bottom: 7px;
              padding-left: 12px;
              padding-right: 12px;
          }
  
          body{
              font-family: "Planewalker", "Lucida Sans Unicode","Arial",sans-serif; 
              background-image: url(https://dl.dropboxusercontent.com/s/2m8803ulxv2mcfc/footer_lodyas.png);
              font-size: 20px;
          }
  
          #footer{
              text-align: right; 
              font-size: 15px;
              color: #FFFFFF;
          }   
  
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="header"&gt;&lt;span style="color:#fbf400;"&gt;T&lt;/span&gt;&lt;span style="color:#faf612;"&gt;o&lt;/span&gt;&lt;span style="color:#f9f824;"&gt;p&lt;/span&gt;&lt;span style="color:#f8fa36;"&gt; &lt;/span&gt;&lt;span style="color:#f8fb48;"&gt;5&lt;/span&gt;&lt;span style="color:#f7fd5a;"&gt; &lt;/span&gt;&lt;span style="color:#f6ff6c;"&gt;T&lt;/span&gt;&lt;span style="color:#f8ff85;"&gt;u&lt;/span&gt;&lt;span style="color:#f9ff9d;"&gt;n&lt;/span&gt;&lt;span style="color:#fbffb6;"&gt;g&lt;/span&gt;&lt;span style="color:#fcffce;"&gt;s&lt;/span&gt;&lt;span style="color:#feffe7;"&gt;t&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;e&lt;/span&gt;&lt;span style="color:#fdffe2;"&gt;n&lt;/span&gt;&lt;span style="color:#fbffc4;"&gt; &lt;/span&gt;&lt;span style="color:#faffa7;"&gt;I&lt;/span&gt;&lt;span style="color:#f8ff89;"&gt;m&lt;/span&gt;&lt;span style="color:#f6ff6c;"&gt;p&lt;/span&gt;&lt;span style="color:#f7fd5a;"&gt;o&lt;/span&gt;&lt;span style="color:#f8fb48;"&gt;r&lt;/span&gt;&lt;span style="color:#f9f936;"&gt;t&lt;/span&gt;&lt;span style="color:#f9f824;"&gt;e&lt;/span&gt;&lt;span style="color:#faf612;"&gt;r&lt;/span&gt;&lt;span style="color:#fbf400;"&gt;s&lt;/span&gt;&lt;/div&gt;
  
  &lt;!--DIV FOR IMPORT LINE MAP ("map")--&gt;
      &lt;div id="map" style="position: relative; width: 1200px; height: 600px;"&gt;&lt;/div&gt;
      &lt;br&gt;
  &lt;!--DIV FOR CANADA MINES MAP--&gt;
      &lt;div id="map2" style="position: relative; width: 1000px; height: 550px;"&gt;&lt;img src="https://dl.dropboxusercontent.com/s/a95n5ecg1a7j62i/canada_mine_map2.png" height="550" width="1000"&gt;&lt;/div&gt;
      &lt;br&gt;
  &lt;!--DIV FOR CHINA MINES MAP--&gt;
      &lt;div id="map3" style="position: relative; width: 1000px; height: 550px;"&gt;&lt;img src="https://dl.dropboxusercontent.com/s/p2vf6q01ck0xt8r/china_province_output_map3.png" height="550" width="1000"&gt;&lt;/div&gt;
  
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"&gt;&lt;/script&gt;
  
      &lt;!-- Imports a ColorBrewer library, containing many pre-designed color schemes --&gt;
      &lt;script src="colorbrewer.js"&gt;&lt;/script&gt;
  &lt;!--GEOJSONS FOR IMPORT LINE MAP--&gt;
      &lt;script src="CHN_crossF.geojson"&gt;&lt;/script&gt;
      &lt;script src="DEU_crossF.geojson"&gt;&lt;/script&gt;
      &lt;script src="FRA_crossF.geojson"&gt;&lt;/script&gt;
      &lt;script src="JPN_crossF.geojson"&gt;&lt;/script&gt;
      &lt;script src="US_crossF.geojson"&gt;&lt;/script&gt;
  
  &lt;!--IMPORT LINE MAP--&gt;
      &lt;script&gt;
  
          var southWest = new L.LatLng(80, -900),
              northEast = new L.LatLng(-80, 900),
              bounds = new L.LatLngBounds(southWest, northEast);
              //can add "maxBounds: bounds" to stop the map at a certian point; add into L.map in the {}
          var map = L.map('map',{
              worldCopyJump:true,
              continuousWorld:false,
              noWrap:false,
              minZoom:3,
              inertia:false,
              maxBounds:bounds
              }).setView([35.460669951495305, -21.796875], 3); //Starting map location
  
          //Sets the basemap
          L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
              maxZoom: 18,
              attribution: '&amp;copy; &lt;a href="http://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors, &amp;copy; &lt;a href="http://cartodb.com/attributions"&gt;CartoDB&lt;/a&gt;',
              id: 'examples.map-20v6611k'
          }).addTo(map);
  
      //WEIGHT &amp; COLOR FOR CHINA
          function getStyle1(feature){
              var weight;
                if (feature.properties.Value &gt; 30000000) {weight = 20;}
                else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                else if (feature.properties.Value &gt; 500000) {weight = 12;}
                else if (feature.properties.Value &gt; 100000) {weight = 10;}
                else if (feature.properties.Value &gt; 1000) {weight = 8;}
                else if (feature.properties.Value &gt; 1) {weight = 6;};
  
              return {
                  color: 'red',
                  weight: weight
                }
          };
  
          var CHNimports = L.geoJson(CHN, {
              style: getStyle1,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to China: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  
      //WEIGHT AND COLOR FOR GERMANY
          function getStyle2(feature){
              var weight;
                if (feature.properties.Value &gt; 30000000) {weight = 20;}
                else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                else if (feature.properties.Value &gt; 500000) {weight = 12;}
                else if (feature.properties.Value &gt; 100000) {weight = 10;}
                else if (feature.properties.Value &gt; 1000) {weight = 8;}
                else if (feature.properties.Value &gt; 1) {weight = 6;};
  
              return {
                  color: '#00FF00',
                  weight: weight
                }
          };
  
          var DEUimports = L.geoJson(DEU, {
              style: getStyle2,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to Germany: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  
      //WEIGHT AND COLOR FOR FRANCE
          function getStyle3(feature){
                  var weight;
                    if (feature.properties.Value &gt; 30000000) {weight = 20;}
                    else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                    else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                    else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                    else if (feature.properties.Value &gt; 500000) {weight = 12;}
                    else if (feature.properties.Value &gt; 100000) {weight = 10;}
                    else if (feature.properties.Value &gt; 1000) {weight = 8;}
                    else if (feature.properties.Value &gt; 1) {weight = 6;};
  
                  return {
                      color: 'white',
                      weight: weight
                    }
          };
  
          var FRAimports = L.geoJson(FRA, {
              style: getStyle3,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to France: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  
      //WEIGHT AND COLOR FOR JAPAN
          function getStyle4(feature){
                  var weight;
                    if (feature.properties.Value &gt; 30000000) {weight = 20;}
                    else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                    else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                    else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                    else if (feature.properties.Value &gt; 500000) {weight = 12;}
                    else if (feature.properties.Value &gt; 100000) {weight = 10;}
                    else if (feature.properties.Value &gt; 1000) {weight = 8;}
                    else if (feature.properties.Value &gt; 1) {weight = 6;};
  
                  return {
                      color: 'yellow',
                      weight: weight
                    }
          };
  
          var JPNimports = L.geoJson(JPN, {
              style: getStyle4,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to Japan: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  
      //WEIGHT AND COLOR FOR US
          function getStyle5(feature){
                  var weight;
                    if (feature.properties.Value &gt; 30000000) {weight = 20;}
                    else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                    else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                    else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                    else if (feature.properties.Value &gt; 500000) {weight = 12;}
                    else if (feature.properties.Value &gt; 100000) {weight = 10;}
                    else if (feature.properties.Value &gt; 1000) {weight = 8;}
                    else if (feature.properties.Value &gt; 1) {weight = 6;};
  
                  return {
                      color: '#0000FF',
                      weight: weight
                    }
          };
  
          var USimports = L.geoJson(US, {
              style: getStyle5,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to US: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  
      //ICONS FOR COUNTRIES~~~~~~~~~~~~~~~~:
          //NORTH AMERICA POINTS
              var CANicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/North%20America%20-%20Mac/Canada.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([56.130366,-106.346771],{icon:CANicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Canada&lt;/b&gt;");
              L.marker([56.130366,253.653229],{icon:CANicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Canada&lt;/b&gt;");
  
              var USicon = L.icon({
                  iconUrl: 'http://static.wix.com/media/93cbc2_eaca32a202866ed8dd83758cc48a0385.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([37.09024,-95.712891],{icon:USicon}).addTo(map)
                  .bindPopup("&lt;b&gt;United States&lt;/b&gt;");
              L.marker([37.09024,264.287109],{icon:USicon}).addTo(map)
                  .bindPopup("&lt;b&gt;United States&lt;/b&gt;");
  
              var MEXicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/North%20America%20-%20Mac/Mexico.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([23.634501,-102.552784],{icon:MEXicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Mexico&lt;/b&gt;");
              L.marker([23.634501,257.447216],{icon:MEXicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Mexico&lt;/b&gt;");
  
          //SOUTH AMERICA POINTS
              var BOLicon = L.icon({
                  iconUrl: 'http://www.argenpapa.com.ar/images/paises/2.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-16.290154,-63.588653],{icon:BOLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Bolivia&lt;/b&gt;");
              L.marker([-16.290154,296.411347],{icon:BOLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Bolivia&lt;/b&gt;");
  
              var BRAicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/flags-icons-by-wolfgang-bartelme/png/216/br.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-14.235004,-51.92528],{icon:BRAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Brazil&lt;/b&gt;");
              L.marker([-14.235004,308.07472],{icon:BRAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Brazil&lt;/b&gt;");
  
              var COLicon = L.icon({
                  iconUrl: 'http://icons.iconseeker.com/png/fullsize/rounded-world-flags/colombia-flag-1.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([4.570868,-74.297333],{icon:COLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Colombia&lt;/b&gt;");
              L.marker([4.570868,285.702667],{icon:COLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Colombia&lt;/b&gt;");
  
              var PERicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/south-america-flags-icons-by-studiotwentyeight/png/256/Peru.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-9.189967,-75.015152],{icon:PERicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Peru&lt;/b&gt;");
              L.marker([-9.189967,284.984848],{icon:PERicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Peru&lt;/b&gt;");
  
              var CHLicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/south-america-flags-icons-by-studiotwentyeight/png/256/Chile.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-35.675147,-71.542969],{icon:CHLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Chile&lt;/b&gt;");
              L.marker([-35.675147,288.457031],{icon:CHLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Chile&lt;/b&gt;");
  
          //EUROPE POINTS
              var PORicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/europe-flags-icons-by-studiotwentyeight/png/256/Portugal.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([39.399872,-8.224454],{icon:PORicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Portugal&lt;/b&gt;");
  
              var ESPicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Europe/Spain.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([40.463667,-3.74922],{icon:ESPicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Spain&lt;/b&gt;");
  
              var FRAicon = L.icon({
                  iconUrl: 'http://png-4.findicons.com/files/icons/656/rounded_world_flags/256/france.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([46.227638,2.213749],{icon:FRAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;France&lt;/b&gt;");
  
              var DEUicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/flags-icons-by-wolfgang-bartelme/png/216/de.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([51.165691,10.451526],{icon:DEUicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Germany&lt;/b&gt;");
  
              var GBRicon = L.icon({
                  iconUrl: 'https://www.railpol.eu/RailPol/fs3_site.nsf/fck_images/069634987717D7A8C1257A83004C7C92/$FILE/United%20Kingdom%20Flag.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([55.378051,-3.435973],{icon:GBRicon}).addTo(map)
                  .bindPopup("&lt;b&gt;United Kingdom&lt;/b&gt;");
  
              var BELicon = L.icon({
                  iconUrl: 'http://png-2.findicons.com/files/icons/656/rounded_world_flags/256/belgium.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([50.503887,4.469936],{icon:BELicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Belgium&lt;/b&gt;");
  
              var TURicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/internet-cons/world-flags-orbs-icons-by-vathanx/png/256/Flag%20of%20Turkey.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([38.963745,35.243322],{icon:TURicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Turkey&lt;/b&gt;");
  
              var CHEicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/europe-flags-icons-by-studiotwentyeight/png/256/Switzerland.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([46.818188,8.227512],{icon:CHEicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Switzerland&lt;/b&gt;");
  
              var ESTicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/internet-cons/world-flags-orbs-icons-by-vathanx/png/256/Flag%20of%20Estonia.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([58.595272,25.013607],{icon:ESTicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Estonia&lt;/b&gt;");
  
          //MIDDLE EAST ICONS
              var ISRicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/asia-flags-icons-by-studiotwentyeight/png/256/Israel.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([31.046051,34.851612],{icon:ISRicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Israel&lt;/b&gt;");
  
          //AFRICA ICONS 
              var RWAicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Africa/Rwanda.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-1.940278,29.873888],{icon:RWAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Rwanda&lt;/b&gt;");
  
              var NGAicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/africa-flags-icons-by-studiotwentyeight/png/256/Nigeria.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([9.081999,8.675277],{icon:NGAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Nigeria&lt;/b&gt;");
  
              var BRIicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/internet-cons/world-flags-orbs-icons-by-vathanx/png/256/Flag%20of%20Burundi.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-3.373056,29.918886],{icon:BRIicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Burundi&lt;/b&gt;");
  
              var DZAicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/internet-cons/world-flags-orbs-icons-by-vathanx/png/256/Flag%20of%20Algeria.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([28.033886,1.659626],{icon:DZAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Algeria&lt;/b&gt;");
  
          //ASIA ICONS 
              var RUSicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/flags-icons-by-wolfgang-bartelme/png/216/ru.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([61.52401,105.318756],{icon:RUSicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Russia&lt;/b&gt;");
              L.marker([61.52401,-254.681244],{icon:RUSicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Russia&lt;/b&gt;");
  
              var CHNicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/China.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([35.86166,104.195397],{icon:CHNicon}).addTo(map)
                  .bindPopup("&lt;b&gt;China&lt;/b&gt;");
              L.marker([35.86166,-255.804603],{icon:CHNicon}).addTo(map)
                  .bindPopup("&lt;b&gt;China&lt;/b&gt;");
  
              var MONicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/Mongolia.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([46.862496,103.846656],{icon:MONicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Mongolia&lt;/b&gt;");
              L.marker([46.862496,-256.153344],{icon:MONicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Mongolia&lt;/b&gt;");
  
              var PHLicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/Philippines.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([12.879721,121.774017],{icon:PHLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Philippines&lt;/b&gt;");
              L.marker([12.879721,-238.225983],{icon:PHLicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Philippines&lt;/b&gt;");
  
              var MMRicon = L.icon({
                  iconUrl: 'https://cdn2.iconfinder.com/data/icons/world-flag-icons/256/Flag_of_Burma_Myanmar.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([21.913965,95.956223],{icon:MMRicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Myanmar&lt;/b&gt;");
              L.marker([21.913965,-264.043777],{icon:MMRicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Myanmar&lt;/b&gt;");
  
              var VNMicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/Vietnam.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([14.058324,108.277199],{icon:VNMicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Vietnam&lt;/b&gt;");
              L.marker([14.058324,-251.722801],{icon:VNMicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Vietnam&lt;/b&gt;");
  
              var THAicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/Thailand.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([15.870032,100.992541],{icon:THAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Thailand&lt;/b&gt;");
              L.marker([15.870032,-259.007459],{icon:THAicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Thailand&lt;/b&gt;");
  
              var PRKicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/flags-icons-by-wolfgang-bartelme/png/216/kp.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([40.339852,127.510093],{icon:PRKicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Democratic People's Republic of Korea&lt;/b&gt;")
              L.marker([40.339852,-232.489907],{icon:PRKicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Democratic People's Republic of Korea&lt;/b&gt;")
  
              var KORicon = L.icon({
                  iconUrl: 'http://files.softicons.com/download/web-icons/flags-icons-by-wolfgang-bartelme/png/216/kr.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([35.907757,127.766922],{icon:KORicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Republic of Korea&lt;/b&gt;")
              L.marker([35.907757,-232.233078],{icon:KORicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Republic of Korea&lt;/b&gt;")
  
              var JPNicon = L.icon({
                  iconUrl: 'http://www.veryicon.com/icon/png/Flag/Asia/Japan.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([36.204824,138.252924],{icon:JPNicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Japan&lt;/b&gt;")
              L.marker([36.204824,-221.747076],{icon:JPNicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Japan&lt;/b&gt;")
  
          //AUSTRALIA ICONS 
              var AUSicon = L.icon({
                  iconUrl: 'http://icons.iconseeker.com/png/fullsize/rounded-world-flags/australia-flag-2.png',
                  iconSize: [35,35],
                  iconAnchor: [17.5,17.5],
                  });
              L.marker([-25.274398,133.775136],{icon:AUSicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Australia&lt;/b&gt;")
              L.marker([-25.274398,-226.224864],{icon:AUSicon}).addTo(map)
                  .bindPopup("&lt;b&gt;Australia&lt;/b&gt;")
  
          //Sets layer control
          var overlay_layers = {
              "Chinese Imports of Tungsten": CHNimports,
              "German Imports of Tungsten": DEUimports,
              "French Imports of Tungsten": FRAimports,
              "Japanese Imports of Tungsten": JPNimports,
              "United States Imports of Tungsten": USimports
          }
          L.control.layers(null, overlay_layers).addTo(map);
  
      &lt;/script&gt;
  
  &lt;br&gt;
  &lt;br&gt;
      &lt;p id="footer"&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><em>Here is a dropbox link to the GEOJSONS if anyone would like to see them (hopefully this works as intended and people can download them)</em>:
  <a href="https://www.dropbox.com/sh/4bi70dx2t99qgln/AABJfyNDJzgNTQK4Wu3vYnVRa?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/sh/4bi70dx2t99qgln/AABJfyNDJzgNTQK4Wu3vYnVRa?dl=0</a></p>
  
  <p>I  have been working on a project to create a flowmap in Leaflet using GEOJSON polylines.  I have only recently become acquainted with JavaScript and Leaflet.  Here is an example of what I would like to make (my map uses rhumb lines and would be interactive):</p>
  
  <p><a href="http://1-ps.googleusercontent.com/hk/O1RiHZz0LGesvxrAKh6VQsIBKN/www.gislounge.com/wp-content/uploads/2014/04/us-trade-map.png.pagespeed.ce.lZRZHu5LCTsqwx1_gWqT.png" rel="nofollow noreferrer">Flowmap Example</a></p>
  
  <p>Here is the updated and working function that changes the polyline weight based on its 'Value' from the GEOJSON file (credit to <a href="https://stackoverflow.com/users/2024590/hinrich">Hinrich</a> &amp; <a href="https://stackoverflow.com/users/209136/jonathan">Jonathan</a> for their help!):</p>
  
  <pre><code>function getStyle1(feature){
              var weight;
                if (feature.properties.Value &gt; 30000000) {weight = 20;}
                else if (feature.properties.Value &gt; 10000000) {weight = 18;}
                else if (feature.properties.Value &gt; 5000000) {weight = 16;}
                else if (feature.properties.Value &gt; 1000000) {weight = 14;}
                else if (feature.properties.Value &gt; 500000) {weight = 12;}
                else if (feature.properties.Value &gt; 100000) {weight = 10;}
                else if (feature.properties.Value &gt; 1000) {weight = 8;}
                else if (feature.properties.Value &gt; 1) {weight = 6;};
  
              return {
                  color: 'red',
                  weight: weight
                }
          };
  
          var CHNimports = L.geoJson(CHN, {
              style: getStyle1,
              onEachFeature: function (feature, layer) {
                  layer.bindPopup("&lt;b&gt;"+"Import Partner: "+feature.properties.Partner+"&lt;/b&gt;"+ "&lt;br /&gt;Dollar value of imports to China: " + feature.properties.Value);
              },
              pointToLayer: function (feature, latlng) {
                  return L.polyline(latlng);
              }
          }).addTo(map);
  </code></pre>
  
  <p><s>The lines vary by value and I will be able to change to color dependent on the country but the popup information does not appear when a polyline is clicked on</s>.</p>
  
  <p>In addition, here is a sample of the GEOJSON file for CHNimports:</p>
  
  <pre><code>var CHN = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Partner":"Algeria","LongX":1.659626,"LatY":28.033886,"CHNLong":104.195397,"CHNLat":35.86166,"Value":587},"geometry":{"type":"LineString","coordinates":[[1.659626,28.033886],[1.669754918002165,28.034691811007274],[1.679883911463014,28.035497621919983],[1.690012980385739,28.036303432738126],[1.700142124773322,28.037109243461707],[1.710271344628953,28.03791505409072],[1.720400639955684,28.038720864625162],[1.730530010756992,28.039526675065034],[1.74065945703536,28.040332485410335],[1.750788978794404,28.041138295661067],[1.760918576037107,28.041944105817212],[1.771048248766518,28.042749915878783],[1.781177996986042,28.04355572584578],[1.791307820698163,28.044361535718185],[1.801437719906642,28.045167345496015],[1.811567694614244,28.045973155179254],[1.821697744824234,28.04677896476791],[1.831827870539733,28.04758477426198],[1.841958071763792,28.04839058366145],[1.852088348499675,28.04919639296634],[1.862218700750077,28.050002202176625], ...continued on
  </code></pre>
  
  <p>Thank you for the help!</p>