CINXE.COM
Our Campaigns - Communist Party USA General Secretary Race - 00, 1959
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head><BASE HREF="https://www.ourcampaigns.com/"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Our Campaigns - Communist Party USA General Secretary Race - 00, 1959</title> <link rel="shortcut icon" href="/favicon.ico" > <link rel="stylesheet" href="/js/leaflet/leaflet.css" /> <script src="/js/leaflet/leaflet.js"></script> <script src="js/mapfunctions.js" type="text/javascript" charset="utf-8"></script> <!--[if IE]><script type="text/javascript" src="https://www.ourcampaigns.com/excanvas.js"></script><![endif]--> </head> <style type="text/css"> <!-- .Text1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000} .Text1Y { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #660000} .TextY1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #EEEEEE} .TextY1Y { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #660000} .Text2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #ffff00} .Headline1 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff} .Headline2 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff} .Small1 { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #330000} td { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000} a { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000} body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000} .infotable {border:1px solid black;border-color:black white white black;border-radius:8px;background-color:#993333;width:100%;margin:0;padding:0;border-spacing:0px;} .infotable tr th {font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:normal;color:#ffffff;text-align:left;margin:0;padding:4px;} .infotable tr td {border-spacing:0;margin:0;padding:2px;border-color:#6084C8;} .HeadlineBig { font-family: Arial, Helvetica, sans-serif; font-size: 35px; color: #ffffff} .MainHeaderBar { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff; background-color: #993333} .SubHeaderBar { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff; background-color: #333366} .SubHeaderBar td { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #ffffff; background-color: #333366; text-align:center; } .Switch0 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000; background-color: #6084C8} .Switch1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #330000; background-color: #7094D8} .Quoted { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style:italic; color: #000000; background-color: #80A4E8; border: 1px dashed #000000; padding:4px;} .maprestbl { border:thin solid black; } .maprestbl td { font-size:8px; border-bottom: thin solid black; padding:0px; margin:0px; border-spacing:0px;} .gm-style .gm-style-iw, .gm-style .gm-style-iw a, .gm-style .gm-style-iw span, .gm-style .gm-style-iw label, .gm-style .gm-style-iw div { font-size: 8px; font-weight: 300; } --> </style> <body bgcolor="#6084C8" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="drawPollGraph();drawLeanGraph();pageLoaded();"> <script language="JavaScript"> <!-- var dylasty=0; var isdy=false; var lastyr=0; function DYDown(fld,e) { dylasty=e.clientY; lastyr=parseInt(fld.value); isdy=true; } function DYMove(fld,e) { if (isdy) { fld.value=String(lastyr-(e.clientY-dylasty)); } } function DYUp(fld,e) { isdy=false; } //--> </script> <script src="ajax.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript" src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script> <script type="text/javascript" src="/js/jquery.tablesorter.min.js"></script> <script>window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function(f) { t._e.push(f); }; return t; }(document, "script", "twitter-wjs"));</script> <script> $( function() { $('.datepicker').change(function() { var id=$(this).attr('id').slice(0,-3); var newdate=$('#'+id+'_DP').val(); $('input[name="'+id+'_year"]').val(newdate.substr(0,4)); $('select[name="'+id+'_month"]').val(newdate.substr(5,2)); $('select[name="'+id+'_day"]').val(newdate.substr(8,2)); }); $('.datepicker').datepicker({ showOn: "button", buttonImage: "/images/calendar.gif", buttonImageOnly: true, buttonText: "Select date", dateFormat: "yy-mm-dd", beforeShow: DPSetFromDate }); $('.datepicker2').change(function() { var id=$(this).attr('id').slice(0,-3); var newdate=$('#'+id+'_DP').val(); $('input[name="'+id+'_year"]').val(newdate.substr(0,4)); $('input[name="'+id+'_month"]').val(newdate.substr(5,2)); $('input[name="'+id+'_day"]').val(newdate.substr(8,2)); }); $('.datepicker2').datepicker({ showOn: "button", buttonImage: "/images/calendar.gif", buttonImageOnly: true, buttonText: "Select date", dateFormat: "yy-mm-dd", beforeShow: DPSetFromDate2 }); } ); function DPSetFromDate(input, inst) { var id=inst.id.slice(0,-3); $('#'+id+'_DP').val($('input[name="'+id+'_year"]').val()+'-'+$('select[name="'+id+'_month"]').val()+'-'+$('select[name="'+id+'_day"]').val()); } function DPSetFromDate2(input, inst) { var id=inst.id.slice(0,-3); $('#'+id+'_DP').val($('input[name="'+id+'_year"]').val()+'-'+$('input[name="'+id+'_month"]').val()+'-'+$('input[name="'+id+'_day"]').val()); } function NowDateInfo() { alert('This date is a virtual time machine which makes the site display in most cases as if the day was actually the date set. For instance, setting it to July 4, 1800 and going to the US container would show the President as John Adams and the 16 states and two territories.'); } function AdjustIFrame(frame) { var maxW = frame.scrollWidth; var minW = maxW; var FrameH = 100; //IFrame starting height frame.style.height = FrameH + "px" while (minW == maxW && FrameH < 800) { FrameH = FrameH + 50; //Increment frame.style.height = FrameH + "px"; minW = frame.scrollWidth; } } </script> <map name="nav"> <area shape="poly" coords="8,87,6,75,44,65,47,77" href="home.html" alt="Home"> <area shape="poly" coords="52,75,50,64,89,60,91,72" href="about.html" alt="About"> <area shape="poly" coords="95,73,95,60,128,61,129,73" href="javascript:popChat()" alt="Chat"> <area shape="poly" coords="133,73,135,60,171,64,172,76" href="UserList.html" alt="Users"> <area shape="poly" coords="206,78,208,68,251,72,249,83" href="IssueDetail.html?IssueID=1" alt="Issues"> <area shape="poly" coords="252,83,255,72,297,75,298,86" href="PartyList.html" alt="Party"> <area shape="poly" coords="301,86,301,75,368,77,369,88" href="CandidateList.html" alt="Candidates"> <area shape="poly" coords="374,88,372,77,430,74,432,85" href="PollingFirmList.html" alt="Polling Firms"> <area shape="poly" coords="434,86,434,74,471,69,472,82" href="MediaList.html" alt="Media"> <area shape="poly" coords="474,82,473,70,507,66,509,78" href="NewsList.html" alt="News"> <area shape="poly" coords="510,78,509,65,538,64,539,77" href="PollList.html" alt="Polls"> <area shape="poly" coords="16,97,13,87,68,76,70,88" href="Calendar.html" alt="Calendar"> <area shape="poly" coords="74,88,73,75,141,75,141,87" href="KeyRaceList.html" alt="Key Races"> <area shape="poly" coords="145,87,145,76,226,82,226,93" href="ContainerDetail.html?ContainerID=1" alt="United States"> <area shape="poly" coords="230,94,231,83,291,87,290,98" href="PresidentList.html" alt="President"> <area shape="poly" coords="294,98,295,87,339,89,340,99" href="SenateList.html" alt="Senate"> <area shape="poly" coords="343,98,344,89,384,89,386,98" href="HouseList.html" alt="House"> <area shape="poly" coords="389,99,390,89,453,85,455,96" href="StateOfficeList.html" alt="Governors"> <area shape="poly" coords="458,96,456,85,534,78,535,91" href="CountryList.html" alt="International"> <area shape="default" href="home.html"> </map> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" width="539"><a href="home.html"><img src="images/NewHeader.gif" border="0" usemap="#nav" width="539" height="120"></a></td> <td background="images/NewHeaderBack.gif" align="right" width="100%" valign="top"><img src="images/spacer.gif" width="180" height="1"><br> <div style="position: absolute; top:4; right:8"> <form name="dateForm" method="post" action="RaceDetail.html?SetNow=Y&RaceID=291807"><input type="button" value="?" onclick="NowDateInfo()"> <select name="NowDate_month" class="Text1"> <option value="00">--</option> <option value="01">Jan</option><option value="02">Feb</option><option value="03">Mar</option><option value="04">Apr</option><option value="05">May</option><option value="06">Jun</option><option value="07">Jul</option><option value="08">Aug</option><option value="09">Sep</option><option value="10">Oct</option><option value="11" SELECTED>Nov</option><option value="12">Dec</option></select> <select name="NowDate_day" class="Text1"> <option value="00">--</option> <option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option SELECTED>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option></select> <input type="text" name="NowDate_year" size="5" maxlength="4" value="2024" onMouseDown="DYDown(this,event)" onMouseUp="DYUp(this,event)" onMouseMove="DYMove(this,event)"> <input type="submit" value="Set" class="Small1"></form> </div> <div style="position: absolute; top:35; right:8"> <form name="searchForm" method="post" action="SearchResults.html"><input type="text" name="SrchTxt" size="15" class="Small1"><input type="submit" value="Search" class="Small1"></form> </div> <div style="position: absolute; top:63; right:8"> <a href="newaccountStep1.html" class="Text2">New User Account</a> </div> </td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%"><tr> <td class="Text1" valign="top" align="center"> <table border="0" cellspacing="0" cellpadding="0" width="95%"><tr> <td align="left"> </td> <td align="right" class="Headline1"><i>"A comprehensive, collaborative elections resource." </i><br></td> </tr></table> <div align="right" class="Headline1"> <form method="POST" action="home.php"><input type="hidden" name="LogIn" value="Y"> Email:<input type="text" name="Username" size="10" class="Text1" value=""> Password:<input type="password" name="PWord" size="10" class="Text1"> <input type="submit" value="Login" class="Text1"> </form> </div> <br> <div class="Headline1" align="left"><font size="+3"> Communist Party USA General Secretary</font></div> <table border="0" width="90%"><tr><td valign="top" class="Text1"> <style> .endorsediv { max-height:80px;overflow-y:auto; } </style> <script> function descriptionL(b) { if (b==0) { document.getElementById('DesShort').style.display='block'; document.getElementById('DesLong').style.display='none'; } else { document.getElementById('DesShort').style.display='none'; document.getElementById('DesLong').style.display='block'; } } var endorseall=false; function showAllEndorse() { if (endorseall) { jQuery('.endorsediv').css('max-height','80px'); endorseall=false; } else { jQuery('.endorsediv').css('max-height'); endorseall=true; } } </script> <table border="0" width="100%"><tr><td valign="top"> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"></td> <td class="Headline1" align="center">RACE DETAILS</td> <td width="42"></td></tr></table></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Parents</td><td class="Switch0"> > <a href="ContainerDetail.html?ContainerID=1" class="Text1">United States</a> > <a href="ContainerDetail.html?ContainerID=60701" class="Text1">Political Organizations </a> > <a href="ContainerDetail.html?ContainerID=62388" class="Text1">Communist Party USA Leadership</a> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Office</td><td class="Switch0">General Secretary </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Honorific</td><td class="Switch0">General Secretary - Abbr: General Secretary</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Type</td><td class="Switch0"> General Election</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Filing Deadline</td><td class="Switch0"> 00, 1959 - 12:00pm Central</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Polls Open</td><td class="Switch0"> 00, 1959 - 12:00am Central</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Polls Close</td><td class="Switch0"> 00, 1959 - 11:00pm Central</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Term Start</td><td class="Switch0"> 00, 1959 - 12:00pm</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Term End</td><td class="Switch0"> 00, 2000 - 12:00am</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Contributor</td><td class="Switch0"><a href="UserDetail.html?UserID=334" class="Text1">Thomas Walker</a></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Last Modified</td><td class="Switch0"><a href="UserDetail.html?UserID=334" class="Text1">Thomas Walker</a> June 09, 2006 01:11pm</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Data Sources</td><td class="Switch0"><a href="http://psychcentral.com/psypsych/Communist_Party_USA" target="_blank" >[Link]</a></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Description</td><td class="Switch0"> </td></tr> </table> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr><td bgcolor="#993333" align="center" class="Headline1" colspan="5">LAST GENERAL ELECTION</td></tr> <tr><td rowspan="3" class="Switch0" align="center"> <img src="../images/candidates/b118/C118101D0000-00-00.jpg" height="75"></td> <td bgcolor="#333366" align="right" class="Headline1">Party</td><td bgcolor="#BA0000"><a href="PartyDetail.html?PartyID=46" class="Headline1">Communist</a></td> <td bgcolor="#333366" align="right" class="Headline1">Won</td><td class="Switch0"><a href="RaceDetail.html?RaceID=291806" class="Text1">00/00/1945</a></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Name</td><td class="Switch0"><a href="CandidateDetail.html?CandidateID=118101" class="Text1">Eugene Dennis</a></td> <td bgcolor="#333366" align="right" class="Headline1">Votes</td><td class="Switch0">1 (100.00%)</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Term</td><td class="Switch0">00/00/1945 - 00/00/1959</td> <td bgcolor="#333366" align="right" class="Headline1">Margin</td><td class="Switch0">1 (+100.00%)</td></tr> </table> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr><td bgcolor="#993333" align="center" class="Headline1" colspan="5">NEXT GENERAL ELECTION</td></tr> <tr><td rowspan="3" class="Switch0" align="center"> <img src="../images/candidates/Candidate82020.jpg" height="75"></td> <td bgcolor="#333366" align="right" class="Headline1">Party</td><td bgcolor="#BA0000"><a href="PartyDetail.html?PartyID=" class="Headline1">Communist</a></td> <td bgcolor="#333366" align="right" class="Headline1">Won</td><td class="Switch0"><a href="RaceDetail.html?RaceID=291808" class="Text1">00/00/2000</a></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Name</td><td class="Switch0"><a href="CandidateDetail.html?CandidateID=82020" class="Text1">Samuel L. Webb</a></td> <td bgcolor="#333366" align="right" class="Headline1">Votes</td><td class="Switch0">1 (100.00%)</td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Term</td><td class="Switch0">00/00/2000 - 06/15/2014</td> <td bgcolor="#333366" align="right" class="Headline1">Margin</td><td class="Switch0">1 (+100.00%)</td></tr> </table> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr><td bgcolor="#993333" align="center" class="Headline1" colspan="3">PRIMARY/OTHER SCHEDULE</td></tr> </table> </td><td valign="top" align="right" class="Text1" style="width:50%;"> <script> function showMapEmbed() { mpe=document.getElementById('MapEmbedDiv'); if (mpe.style.display=='block') { mpe.style.display='none'; } else { mpe.style.display='block'; } } function hideMapEmbed() { document.getElementById('MapEmbedDiv').style.display='none'; } function raceDataDownload() { var dsel=document.getElementById('ViewMap'); var dtype=dsel.options[dsel.selectedIndex].value; document.location.href='/RaceDownload.php?RaceID=291807&DType='+dtype; } </script> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="42"><img src="../images/spacer.gif" width="40" height="15"></td> <td class="Headline1" align="center">MAP</td> <td width="42"></td></tr></table></td></tr> <tr><td colspan="3" class="Switch0" align="center" style="border-radius:8px;"><div id="SubMaps"> <div id="map_canvas20437" style="width:100%; height:300px;display:none;"></div> </div> <div id="MapLocDetails" style="display:none;width:100%;"></div> </td></tr> </table> <script type="text/javascript"> var mpoly=new Array; var mpcid=new Array; var geojsonLayer=new Array; var mnlo=new Array; var mxlo=new Array; var mnlt=new Array; var mxlt=new Array; var lmnlo=new Array; var lmxlo=new Array; var lmnlt=new Array; var lmxlt=new Array; function mq(lat,lon) { return new google.maps.LatLng(lat,lon); } </script> <div id="DynamicJS"> </div> <script type="text/javascript"> var hexA = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"); var hexR = {"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","A":"10","B":"11","C":"12","D":"13","E":"14","F":"15"}; var map; var leafmap=new Array; var clayer=new Array; var demog=new Array; var compare=new Array; var offices=new Array; var officeload=new Array; var racesubs=new Array; var infowindow; var bubbles=new Array; var maxbubble=new Array; var dopoly=new Array; var mpolyo=new Array; var mpolyc=new Array; var mpidd=new Array; var raceid=new Array; var cname=new Array; var canids=new Array; var canname=new Array; var canpic=new Array; var cancolor=new Array; var canpty=new Array; var canpv=new Array; var canptyv=new Array; var canvotes=new Array; var canlon=new Array; var canlat=new Array; var turnover=new Array; var mpcrv=new Array; var mpbcrv=new Array; var mploc=new Array; var subname=new Array; var pcolor=''; var curMap=0; var curView=0; var curType=''; canids["1"]=4191; canname["4191"]='Gus'+" "+'Hall'; cancolor["4191"]='#BA0000'; canpty["4191"]='46'; canvotes["4191"]='1'; canlon["4191"]='-73.8987469'; canlat["4191"]='40.9312099'; canname["118101"]='Eugene'+" "+'Dennis'; canptyv["46"]=118101; var canv=new Array; var canp=new Array; function pageLoaded() { //alert('Page Loaded'); viewMapChange(); $( window ).resize(function() { setMapRatio(curView,0.510708); if (clayer[curView]) { leafmap[curView].fitBounds(clayer[curView].getBounds()); } else { leafmap[curView].fitBounds(geojsonLayer[curView].getBounds()); } }); } function setMapRatio(milk,mratio) { var mwidth=$('#map_canvas'+milk).outerWidth(); var mheight=Math.ceil(mwidth*mratio); if (mheight > 700) { mheight=700; } $('#map_canvas'+milk).height(mheight); } function checkCandidatesPanel() { var cp=document.getElementById('MapCandidatesDiv'); if (cp.style.display == 'none') { cp.style.display='block'; document.getElementById('MapCandidatesButton').value='-Candidates'; } else { cp.style.display='none'; document.getElementById('MapCandidatesButton').value='+Candidates'; } } function changeMapType() { var mtype=document.getElementById('WhichMap').value; if (mtype == 'vc' && compare[map] == undefined) { compareOfficesLoad(); } else { if (mtype == 'dr') { document.getElementById('SelDemographic').style.display='block'; } else { document.getElementById('SelDemographic').style.display='none'; } if (curType == 'V' || curType == 'P') { if (curType == 'P' && mtype == 'vd' && canpv.length == 0) { $.getJSON('https://www.ourcampaigns.com/ajax/racevtdresults.php?RaceID=291806', function(data){ for (var key in data['Candidates']) { if (data['Candidates'][key]['PartyID'] !== 'undefined' && typeof canptyv[data['Candidates'][key]['PartyID']] === 'undefined') { canptyv[data['Candidates'][key]['PartyID']]=key; canname[key]=data['Candidates'][key]['FirstName']+' '+data['Candidates'][key]['LastName']; } } for (var v in data['VTDResults']) { canpv[v]=new Array; for (var i=0; i < data['VTDResults'][v].length; i++) { if (typeof canpv[v][data['VTDResults'][v][i]['p']] === 'undefined') { canpv[v][data['VTDResults'][v][i]['p']]=parseInt(data['VTDResults'][v][i]['v']); } } } redoMap(curView); }); } else { redoMap(curView); } } else { var locs=init_bitmap(curView); //cument.getElementById('bitmap_holder'+curView).innerHTML='<img src="https://www.ourcampaigns.com/cgi-bin/mapdisplay.cgi?MapImageID='+curView+locs+'" border="0">'; $('#bitmap_holder'+curView+' img').attr('src','https://www.ourcampaigns.com/cgi-bin/mapdisplay.cgi?MapImageID='+curView+locs); } } } function changeMapCurve() { if (curType == 'V' || curType == 'P') { redoMap(curView); } } function changeMapCurveBitmap() { if (curType == 'V' || curType == 'P') { redoMap(curView); } else { var locs=init_bitmap(curView); //$('#bitmap_holder'+curView).css('height',$('#bitmap_holder'+curView+' img').height()); $('#bitmap_holder'+curView+' img').attr('src','https://www.ourcampaigns.com/cgi-bin/mapdisplay.cgi?MapImageID='+curView+locs); } } function leafletMap(milk) { //console.log(mpoly[milk]); setMapRatio(milk,0.510708); var maxmargin=0; var numpoly=0; for (i=0; i<mpoly[milk]['features'].length; i++) { var cid=mpoly[milk]['features'][i].geometry.properties.cid; if (canv[cid]) { var maxvotes=0; var secondvotes=0; //for (c=0; c<canids.length; c++) { for(var c in canv[cid]) { var v=0; if (canv[cid]) { v=canv[cid][c]; } if (v == null) { v=0; } if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[c]; } else if (v > secondvotes) { secondvotes=v; } } if (maxvotes > 0) { numpoly++; } if ((maxvotes-secondvotes) > maxmargin) { maxmargin=maxvotes-secondvotes; } } } var mymap = L.map('map_canvas'+milk); leafmap[milk]=mymap; var sweight=0.5; if (curType == 'P') { sweight=0.1; } geojsonLayer[milk]=L.geoJSON(mpoly[milk], { color: '#000000', weight: sweight, onEachFeature: onEachFeature, style: function (feature) { var curve=parseInt($('#curveslider').slider( "option", "value" ))/100; var cid=feature.geometry.properties.cid; cname[cid]=feature.geometry.properties.name; //console.log('cid: '+cid); var allvotes=0; var maxvotes=0; var secondvotes=0; var wincolor='#ffffff'; for(var c in canv[cid]) { //console.log('cid: '+cid+' c:'+c+' v:'+canv[cid][c]); var v=0; if (canv[cid]) { v=canv[cid][c]; } if (v == null) { v=0; } allvotes+=v; if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[c]; } else if (v > secondvotes) { secondvotes=v; } } var opacity=Math.pow((maxvotes-secondvotes)/maxmargin,curve); //console.log(maxvotes+' '+secondvotes+' '+maxmargin+' '+curve+' '+wincolor+' '+opacity); if (!turnover[cid]) { turnover[cid]='#000000'; } var stko=0.5; if (curType == 'P') { stko=0.1; } if (turnover[cid] != '#000000') { stko=0.5; } return { color:turnover[cid], weight:stko, fillColor: wincolor, fillOpacity: opacity }; } }).addTo(mymap); mymap.fitBounds(geojsonLayer[milk].getBounds()); L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { attribution: 'Data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles: <a href="https://www.mapbox.com/">Mapbox</a>', tileSize: 512, zoomOffset: -1, maxZoom: 18, id: 'mapbox/streets-v11', accessToken: 'sk.eyJ1IjoiZW50cm9waXN0IiwiYSI6ImNraG53Y2M0ZzBiNHoyeW1pNTB1Mjc0NXMifQ.eSKmJwV5Qy1g-WELf1rL1g' }).addTo(mymap); // calculate maxbubble size var center = mymap.getCenter(); var eastBound = mymap.getBounds().getEast(); var centerEast = L.latLng(center.lat, eastBound); var dist = center.distanceTo(centerEast); maxbubble[milk] = dist*.5; for(var c in canids) { if (canlat[canids[c]] != null && canlon[canids[c]] != null && cancolor[canids[c]] != null && canname[canids[c]] != null) { //var myIcon = new L.icon({ iconUrl: 'https://chart.apis.google.com/chart?cht=mm&chs=20x20&chco=ffffff,'+cancolor[canids[c]].substr(1)+',000000', iconSize:[20,20], iconAnchor:[10,20] }); //var myIcon = { path: "M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0", fillColor: cancolor[canids[c]], fillOpacity: 1, anchor: new google.maps.Point(0, 0), strokeWeight: 1, scale: 0.5 } var iconSVG='<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 -40 60 60" width="40" height="40"><path fill="'+cancolor[canids[c]]+'" fill-opacity="1" d="M0,-36c-9.941,0 -18,8.059 -18,18c0,13.858 18,36 18,36c0,0 18,-22.142 18,-36c0,-9.941 -8.059,-18 -18,-18z M-4,18 L4,18 Z" stroke="#000" stroke-width="3"/> <text x="0" y="-5" fill="#000" font-family="Arial" font-weight="bold" font-size="20" text-anchor="middle" alignment-baseline="middle"> </text></svg>'; var iconSVGblob = new Blob([iconSVG], { type: "image/svg+xml" }); var iconSVGurl = URL.createObjectURL(iconSVGblob); var myIcon = new L.icon({ iconUrl: iconSVGurl, iconSize:[20,20], iconAnchor:[10,20] }); var marker = new L.Marker([canlat[canids[c]],canlon[canids[c]]],{icon: myIcon, title: canname[canids[c]] }).addTo(mymap); } } mpoly[559]=new Array(); $.getJSON( "/geojson/MapImage559.json", function( data ) { mpoly[559]=data; for(var i=0; i<mpoly[559].features.length; i++) { if (mpoly[559].features[i].geometry.properties.cid == 62388) { clayer[milk]=L.GeoJSON.geometryToLayer(mpoly[559].features[i].geometry, {interactive: false, color:'#00ff00',opacity:0.8,weight:2,fillOpacity:0}); clayer[milk].addTo(mymap); setMapRatio(milk,0.510708); mymap.fitBounds(clayer[milk].getBounds()); break; } } }); } function onEachFeature(feature, layer) { layer.on({ mouseover: putRaceInfo, mouseout: remRaceInfo, click: goRaceInfo }); } function compareOfficesLoad() { var msel=document.getElementById('ViewMap'); var map=msel.value; map=parseInt(map.substr(1)); if (compare[map] == undefined) { $.getJSON('https://www.ourcampaigns.com/ajax/CompareOffices.php?RaceID=291807&MapImageID='+map, function(data){ compare[map]=data['compareOffices']; officeload[map]=new Array; racesubs[map]=new Array; compareOfficesPopup(map); }); } else { compareOfficesPopup(map); } } function compareOfficesPopup(map) { var html="<table>"; for(var i in compare[map]) { html+='<tr><td><a href="javascript:compareOfficesSelect(\''+compare[map][i]['OfficeID']+"','"+compare[map][i]['RDate']+'\')">'+compare[map][i]['Office']+"</a></td><td>"+compare[map][i]['RDate']+"</td></tr>\n"; offices[compare[map][i]['OfficeID']]=compare[map][i]['Office']; } $('#CompareOfficePopup').html(html+"</table>\n"); $('#CompareOfficePopup').show(); $('#CompareOfficeChange').show(); } function compareOfficesSelect(office,thedate) { var msel=document.getElementById('ViewMap'); var map=msel.value; map=parseInt(map.substr(1)); $('#CompareOfficePopup').hide(); $('#MapCompareOffice').val(office); $('#MapCompareDate').val(thedate); $('#CompareOfficeChange').val(offices[office]+' - '+thedate+' - Change'); if (officeload[map][office] == undefined) { $.getJSON('https://www.ourcampaigns.com/ajax/OfficeSubDataJSON.php?OfficeID='+office+'&MapImageID='+map+'&PollDate='+encodeURIComponent(thedate), function(data){ for(var i in data['race']) { var d=data['race'][i]; racesubs[map][d['RaceID']]=d; } officeload[map][office]=true; viewMapChange(); redoMap(curView); }); } else { viewMapChange(); redoMap(curView); } } function viewMapChange() { var msel=document.getElementById('ViewMap'); var map=msel.value; var newType=map.substr(0,1); if (curType == 'V' || curType == 'P') { //alert('Old GMap display none'); document.getElementById('map_canvas'+curView).style.display = 'none'; } else { //alert('Old BMap display none'); if (document.getElementById('bitmap_holder'+curView)) { document.getElementById('bitmap_holder'+curView).style.display = 'none'; } } if (newType == 'V' || newType == 'P') { map=parseInt(map.substr(1)); //console.log('newType:'+newType+' Map:'+map+' MPoly:'+mpoly[map]+' DoPoly:'+dopoly[map]); if (demog[map] == undefined) { $.getJSON('https://www.ourcampaigns.com/ajax/DemographicMapJSON.php?MapImageID='+map+'&TheDate='+encodeURIComponent('1959-00-00 23:00:00'), function(data){ demog[map]=data; }); } if (mpoly[map] == undefined) { if (newType == 'V') { mpoly[map]=new Array(); $.getJSON( "/geojson/MapImage"+map+".json", function( data ) { mpoly[map]=data; //viewMapChange(); leafletMap(map); }); } else { curType=newType; mpoly[map]=new Array(); //console.log("/geojson/vtd/VTDml"+map+"--.json"); $.getJSON( "/geojson/vtd/VTDml"+map+"--.json", function( data ) { mpoly[map]=data; //viewMapChange(); leafletMap(map); }); var headID = document.getElementById('DynamicJS'); var newScript2 = document.createElement('script'); newScript2.type = 'text/javascript'; newScript2.onload=function() { if (mpoly[map]) { redoMap(map); } } newScript2.src = '/racevtdresults.php?RaceID=291807'; headID.appendChild(newScript2); } } document.getElementById('map_canvas'+map).style.display = 'block'; curType=newType; curView=map; } else { map=parseInt(map.substr(1)); var bmh=document.getElementById('bitmap_holder'+map); if (bmh) { if (bmh.innerHTML == '') { var locs=init_bitmap(map); bmh.innerHTML='<img src="https://www.ourcampaigns.com/cgi-bin/mapdisplay.cgi?MapImageID='+map+locs+'" border="0">'; } bmh.style.display = 'block'; curType=''; curView=map; } } } function init_bitmap(milk) { var loc=''; var mtype=document.getElementById('WhichMap').value; //var curve=parseInt(document.getElementById('MapCurve').value)/100; var curve=parseInt($('#curveslider').slider( "option", "value" ))/100; var maxmargin=0; var maxavotes=0; for (i=1; i<mploc[milk].length; i++) { if (mploc[milk][i]) { var maxvotes=0; var secondvotes=0; //for (c=0; c<canids.length; c++) { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[mploc[milk][i]]) { v=canv[mploc[milk][i]][canids[c]]; } if (v == null) { v=0; } if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } } if ((maxvotes-secondvotes) > maxmargin) { maxmargin=maxvotes-secondvotes; } if (maxvotes > maxavotes) { maxavotes=maxvotes; } } } if (mpoly[milk] != undefined) { for (i=1; i<mploc[milk].length; i++) { if (mploc[milk][i]) { var allvotes=0; var allvotesp=0; var maxvotes=0; var secondvotes=0; var wincolor='#ffffff'; //for (c=0; c<canids.length; c++) { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[mploc[milk][i]]) { v=canv[mploc[milk][i]][canids[c]]; } if (v == null) { v=0; } allvotes+=v; if (mtype == 'vd') { allvotesp+=canp[mploc[milk][i]][canpty[c]]; } else { if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } } } if (mtype == 'vs') { var opacity=Math.pow((maxvotes-secondvotes)/maxmargin,curve); } else if (mtype == 'vm') { var opacity=Math.pow((maxvotes-secondvotes)/allvotes,curve); } else if (mtype == 'vp') { var opacity=Math.pow(maxvotes/allvotes,curve); } else if (mtype == 'vt') { wincolor='#000000'; var opacity=Math.pow(allvotes/maxavotes,curve); } else if (mtype == 'vl') { var mgn=((maxvotes-secondvotes)/allvotes) * 100; if (mgn == 0) { var opacity=0; } else if (mgn < 4) { var opacity=0.1; } else if (mgn < 9) { var opacity=0.3; } else if (mgn < 15) { var opacity=0.6; } else { var opacity=0.9; } } else if (mtype == 'vd') { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[mploc[milk][i]]) { v=canv[mploc[milk][i]][canids[c]]; } if (v == null) { v=0; } percent_change=((v/allvotes)-(canp[mploc[milk][i]][canpty[c]]/allvotesp))*100; if (percent_change > maxchange) { maxchange=percent_change; wincolor=cancolor[canids[c]]; } } } var opacity=Math.pow(maxchange,curve); } var ucolor=wincolor.toUpperCase(); var rcolor=255-Math.floor((255-parseInt(hexR[ucolor.substr(1,1)])*16+parseInt(hexR[ucolor.substr(2,1)]))*opacity); var gcolor=255-Math.floor((255-parseInt(hexR[ucolor.substr(3,1)])*16+parseInt(hexR[ucolor.substr(4,1)]))*opacity); var bcolor=255-Math.floor((255-parseInt(hexR[ucolor.substr(5,1)])*16+parseInt(hexR[ucolor.substr(6,1)]))*opacity); var ocolor=hexA[Math.floor(rcolor/16)]+hexA[Math.floor(rcolor%16)]+hexA[Math.floor(gcolor/16)]+hexA[Math.floor(gcolor%16)]+hexA[Math.floor(bcolor/16)]+hexA[Math.floor(bcolor%16)]; loc+='&L'+mploc[milk][i]+'='+ocolor; } } } return loc; } function init_map(milk) { var mtype=document.getElementById('WhichMap').value; //var curve=parseInt(document.getElementById('MapCurve').value)/100; var curve=parseInt($('#curveslider').slider( "option", "value" ))/100; var sw = new google.maps.LatLng(mnlt[milk],mnlo[milk]); var ne = new google.maps.LatLng(mxlt[milk],mxlo[milk]); var mapb = new google.maps.LatLngBounds(sw,ne); var myOptions = { zoom: 8, center: sw, mapTypeId: google.maps.MapTypeId.ROADMAP }; var mc=document.getElementById('map_canvas'+milk); if (mc == null) { var ni = document.getElementById('SubMaps'); var newcanvas = document.createElement('canvas'); newcanvas.setAttribute('id','map_canvas'+milk); newcanvas.setAttribute('width','100%'); newcanvas.setAttribute('height','300px'); ni.appendChild(newcanvas); mc=document.getElementById('map_canvas'+milk); } var map = new google.maps.Map(mc, myOptions); myFitBounds(map,mapb); //map.fitBounds(mapb); dopoly[milk]=new Array; var polyevt=new Array; var maxmargin=0; var numpoly=0; if (mpoly[milk] != undefined) { for (i=0; i<mpoly[milk].length; i++) { if (mpcid[milk][i]) { var maxvotes=0; var secondvotes=0; //for (c=0; c<canids.length; c++) { for(var c in canids) { var v=0; if (canv[mpcid[milk][i]]) { v=canv[mpcid[milk][i]][canids[c]]; } if (v == null) { v=0; } if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } if (maxvotes > 0) { numpoly++; } if ((maxvotes-secondvotes) > maxmargin) { maxmargin=maxvotes-secondvotes; } } } for (i=0; i<mpoly[milk].length; i++) { if (mpcid[milk][i]) { var allvotes=0; var maxvotes=0; var secondvotes=0; var wincolor='#ffffff'; //for (c=0; c<canids.length; c++) { for(var c in canids) { var v=0; if (canv[mpcid[milk][i]]) { v=canv[mpcid[milk][i]][canids[c]]; } if (v == null) { v=0; } allvotes+=v; if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } var opacity=Math.pow((maxvotes-secondvotes)/maxmargin,curve); //alert(wincolor+" "+opacity+" "+maxvotes+" "+allvotes); if (!turnover[mpcid[milk][i]]) { turnover[mpcid[milk][i]]='#000000'; } var zindex=0; if (turnover[mpcid[milk][i]] != '#000000') { zindex=10; } var sweight=1.5; if (curType == 'P') { sweight=0.1; } if (opacity == 0) { opacity=0.1; wincolor='#ffffff'; } dopoly[milk][i] = new google.maps.Polygon({ paths: mpoly[milk][i], strokeColor: turnover[mpcid[milk][i]], strokeOpacity: 0.9, strokeWeight: sweight, zIndex: zindex, fillColor: wincolor, fillOpacity: opacity }); dopoly[milk][i].set('cid',mpcid[milk][i]); google.maps.event.addListener(dopoly[milk][i], 'mouseover', function(event) { putRaceInfo(event.latLng,this); }); google.maps.event.addListener(dopoly[milk][i], 'mouseout', function(event) { remRaceInfo(event.latLng,this); }); google.maps.event.addListener(dopoly[milk][i], 'mousemove', function(event) { moveRaceInfo(event.latLng,this); }); google.maps.event.addListener(dopoly[milk][i], 'click', function(event) { goRaceInfo(event.latLng,this); }); dopoly[milk][i].setMap(map); } } for(var c in canids) { if (canlat[canids[c]] != null && canlon[canids[c]] != null && cancolor[canids[c]] != null && canname[canids[c]] != null) { var myLatlng = new google.maps.LatLng(canlat[canids[c]],canlon[canids[c]]); var myIcon = { path: "M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0", fillColor: cancolor[canids[c]], fillOpacity: 1, anchor: new google.maps.Point(0, 0), strokeWeight: 1, scale: 0.5 } var marker = new google.maps.Marker({ position: myLatlng, map: map, icon: myIcon, iconSize:[20,20], iconAnchor:[10,20], title: canname[canids[c]] }); } } for (i=0; i<mpoly[559].length; i++) { if (mpcid[559][i]=='62388') { tmp = new google.maps.Polyline({ path: mpoly[559][i], strokeColor: "#00ff00", strokeOpacity: 0.9, strokeWeight: 2.0, zIndex: 20 }); tmp.setMap(map); var sw = new google.maps.LatLng(lmnlt[559][i],lmnlo[559][i]); var ne = new google.maps.LatLng(lmxlt[559][i],lmxlo[559][i]); var mapb = new google.maps.LatLngBounds(sw,ne); myFitBounds(map,mapb); //map.fitBounds(mapb); } } } } function redoMap(milk) { var msel=document.getElementById('ViewMap'); var map=msel.value; map=parseInt(map.substr(1)); var mtype=document.getElementById('WhichMap').value; //var curve=parseInt(document.getElementById('MapCurve').value)/100; var curve=parseInt($('#curveslider').slider( "option", "value" ))/100; var maxmargin=0; var maxavotes=0; var racevotes=0; for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { racevotes+=parseInt(canvotes[canids[c]]); } } //console.log('racevotes: '+racevotes); if (geojsonLayer[milk] !== undefined) { if ((mtype == 'bm' || mtype == 'bv') && bubbles[milk] === undefined) { bubbles[milk]=new Array; } for (var i in geojsonLayer[milk]._layers) { var cid=geojsonLayer[milk]._layers[i].feature.geometry.properties.cid; var maxvotes=0; var secondvotes=0; var allvotes=0; //for (c=0; c<canids.length; c++) { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } allvotes+=v; if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } } if ((maxvotes-secondvotes) > maxmargin) { maxmargin=maxvotes-secondvotes; } if (maxvotes > maxavotes) { maxavotes=maxvotes; } } for (var i in geojsonLayer[milk]._layers) { var cid=geojsonLayer[milk]._layers[i].feature.geometry.properties.cid; var allvotes=0; var allvotesp=0; var maxvotes=0; var secondvotes=0; var maxchange=0; var wincolor='#ffffff'; //for (c=0; c<canids.length; c++) { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } allvotes+=v; if (mtype == 'vd') { if (curType == 'P') { if (canpv[cid] && canpv[cid][canpty[canids[c]]]) { allvotesp+=canpv[cid][canpty[canids[c]]]; } } else { if (canp[cid] && canp[cid][canpty[canids[c]]]) { allvotesp+=canp[cid][canpty[canids[c]]]; } } } else if (mtype == 'vc') { if (curType == 'P') { //if (canpv[cid] && canpv[cid][canpty[canids[c]]]) { allvotesp+=canpv[cid][canpty[canids[c]]]; } } else { for(var key in racesubs[map]) { if (racesubs[map][key]['Subs'][cid] !== undefined) { for(var oc in racesubs[map][key]['Candidates']) { if (racesubs[map][key]['Candidates'][oc]['PartyID'] == canpty[canids[c]]) { allvotesp+=racesubs[map][key]['Subs'][cid][oc]; } } } } } } else { if (v > maxvotes) { secondvotes=maxvotes; maxvotes=v; wincolor=cancolor[canids[c]]; } else if (v > secondvotes) { secondvotes=v; } } } } if (mtype == 'vs') { var opacity=Math.pow((maxvotes-secondvotes)/maxmargin,curve); //if (numpoly==1) { opacity=Math.pow((maxvotes-secondvotes)/allvotes,curve); } //if (maxmargin == (maxvotes-secondvotes)) { opacity=0.5; } } else if (mtype == 'bm') { var bsize=(maxvotes-secondvotes)/maxavotes; var bopacity=0.8; var opacity=0; } else if (mtype == 'bv') { var bsize=allvotes/maxavotes; var bopacity=Math.pow((maxvotes-secondvotes)/allvotes,curve); //var bopacity=Math.pow((maxvotes-secondvotes)/maxmargin,curve); var opacity=0; } else if (mtype == 'vm') { var opacity=Math.pow((maxvotes-secondvotes)/allvotes,curve); } else if (mtype == 'vp') { var opacity=Math.pow(maxvotes/allvotes,curve); } else if (mtype == 'vx') { var wincolorr=0; var wincolorg=0; var wincolorb=0; for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } if (cancolor[canids[c]] === undefined || cancolor[canids[c]] == '') { cancolor[canids[c]]='#888888'; } var cpct=v/allvotes; wincolorr+=parseInt(cancolor[canids[c]].substr(1,2),16)*cpct; wincolorg+=parseInt(cancolor[canids[c]].substr(3,2),16)*cpct; wincolorb+=parseInt(cancolor[canids[c]].substr(5,2),16)*cpct; } } var wincolor='#'+toHex(Math.round(wincolorr))+toHex(Math.round(wincolorg))+toHex(Math.round(wincolorb)); var opacity=0.8; } else if (mtype == 'vt') { wincolor='#000000'; var opacity=Math.pow(allvotes/maxavotes,curve); } else if (mtype == 'vl') { var mgn=((maxvotes-secondvotes)/allvotes) * 100; if (mgn == 0) { var opacity=0; } else if (mgn < 4) { var opacity=0.1; } else if (mgn < 9) { var opacity=0.3; } else if (mgn < 15) { var opacity=0.6; } else { var opacity=0.9; } } else if (mtype == 'vd' && curType == 'P') { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } if (canpv[cid]) { percent_change=((v/allvotes)-(canpv[cid][canpty[canids[c]]]/allvotesp)); } else { percent_change=0; } if (percent_change > maxchange) { maxchange=percent_change; wincolor=cancolor[canids[c]]; } } } var opacity=Math.pow(maxchange,curve); } else if (mtype == 'vd') { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } if (canp[cid]) { percent_change=((v/allvotes)-(canp[cid][canpty[canids[c]]]/allvotesp)); } else { percent_change=0; } if (percent_change > maxchange) { maxchange=percent_change; wincolor=cancolor[canids[c]]; } } } var opacity=Math.pow(maxchange,curve); } else if (mtype == 'vc') { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } var canold=0; for(var key in racesubs[map]) { if (racesubs[map][key]['Subs'][cid] !== undefined) { for(var oc in racesubs[map][key]['Candidates']) { if (racesubs[map][key]['Candidates'][oc]['PartyID'] == canpty[canids[c]]) { canold+=racesubs[map][key]['Subs'][cid][oc]; } } } } if (canold) { percent_change=((v/allvotes)-(canold/allvotesp)); } else { percent_change=0; } if (percent_change > maxchange) { maxchange=percent_change; wincolor=cancolor[canids[c]]; } } } var opacity=Math.pow(maxchange,curve); } else if (mtype == 'vn') { for(var c in canids) { if (document.getElementById('MpCn'+canids[c]).checked) { var v=0; if (canv[cid]) { v=canv[cid][canids[c]]; } if (v == null) { v=0; } percent_change=((v/allvotes)-(canvotes[canids[c]]/racevotes)); if (percent_change > maxchange) { maxchange=percent_change; wincolor=cancolor[canids[c]]; } } } var opacity=Math.pow(maxchange,curve); } else if (mtype == 'dr') { var demosel=document.getElementById('SelDemographic').value; var demoval=demosel.split(': '); wincolor='#000000'; opacity=Math.pow(parseInt(demog[milk][cid]['Demographics'][demoval[0]][demoval[1]])/parseInt(demog[milk][cid]['Demographics']['Population']['Population']),curve); //console.log(opacity); } var sweight=0.5; if (curType == 'P') { sweight=0.1; } if (mtype == 'bm' || mtype == 'bv') { var radius=(Math.sqrt(bsize)/3.141529)*maxbubble[milk]*curve; if (bubbles[milk][i] === undefined) { if (!isNaN(geojsonLayer[milk]._layers[i].feature.geometry.properties.centroidlat)) { var pcenter=L.latLng(geojsonLayer[milk]._layers[i].feature.geometry.properties.centroidlat, geojsonLayer[milk]._layers[i].feature.geometry.properties.centroidlon); } else { var pcenter=geojsonLayer[milk]._layers[i].getBounds().getCenter(); } bubbles[milk][i]=L.circle(pcenter, { opacity:0, fillColor: wincolor, fillOpacity: bopacity, radius: radius, cid: cid }).addTo(leafmap[milk]); //bubbles[milk][i].feature.geometry.properties.cid=cid; bubbles[milk][i].on({ mouseover: putRaceInfo, mouseout: remRaceInfo, click: goRaceInfo }); } else { bubbles[milk][i].setStyle({fillOpacity: bopacity}); bubbles[milk][i].setRadius(radius); } } else { if (bubbles[milk] && bubbles[milk][i] !== undefined) { bubbles[milk][i].setStyle({fillOpacity: 0}); } if (opacity < 0.001) { opacity=0.4; wincolor='#ffffff'; } } geojsonLayer[milk]._layers[i].setStyle({fillColor:wincolor, fillOpacity:opacity, weight:sweight }); } } } function toHex(d) { return ("0"+(Number(d).toString(16))).slice(-2).toUpperCase(); } function putRaceInfo(e) { if (e.target.feature !== undefined) { var feature=e.target.feature; var cid=feature.geometry.properties.cid; } else { var cid=e.target.options.cid; } var msel=document.getElementById('ViewMap'); var map=msel.value; var newType=map.substr(0,1); if (newType == 'P') { var tcname=cname[cid]; } else { var tcname=subname[cid]; } var contentString='<table class="maprestblb" style="background-color:white;"><tr><th colspan="8" style="background-color:#333366;color:white;text-align:center;"><b>'+tcname+'</b></th></tr>'; var most=999999999999; var mostid=0; var didcan=[]; var mtype=document.getElementById('WhichMap').value; var milk=curView; if (mtype == 'vn') { var totalvotes=0; for(var i in canv[cid]) { if (document.getElementById('MpCn'+i).checked) { totalvotes+=canv[cid][i]; } } for(var j in canv[cid]) { if (document.getElementById('MpCn'+j) && document.getElementById('MpCn'+j).checked) { var newmost=-100; var pct=0; var delta=0; for(var i in canv[cid]) { if (document.getElementById('MpCn'+i) && document.getElementById('MpCn'+i).checked) { pct=Math.round((canv[cid][i]/totalvotes)*10000)/100; delta=(Math.round((pct-(canvotes[i]/1.000000*100))*100)/100); if (didcan[i] != 'Y' && delta <= most && delta >= newmost) { newmost=delta; mostid=i; } } } most=newmost; didcan[mostid]='Y'; pct=Math.round((canv[cid][mostid]/totalvotes)*10000)/100; delta=(Math.round((pct-(canvotes[mostid]/1.000000*100))*100)/100); contentString+='<tr><td bgcolor="'+cancolor[mostid]+'"> </td><td>'+canname[mostid]+'</td><td align="right">'+pct+'%</td><td align="right">'+canv[cid][mostid]+'</td>'; if (delta >= 0) { delta='+'+delta; } contentString+='<td align="right">'+delta+'%</td>'; contentString+='</tr>'; } } } else if (mtype == 'vd') { var totalvotes=0; allvotesp=0; if (curType == 'P') { var tcan=canpv; } else { var tcan=canp; } for(var i in canv[cid]) { if (document.getElementById('MpCn'+i).checked) { totalvotes+=canv[cid][i]; if (tcan[cid] && tcan[cid][canpty[i]]) { allvotesp+=tcan[cid][canpty[i]]; } } } for(var j in canv[cid]) { if (document.getElementById('MpCn'+j).checked) { var newmost=-100; var pct=0; var delta=0; for(var i in canv[cid]) { if (document.getElementById('MpCn'+i).checked) { pct=Math.round((canv[cid][i]/totalvotes)*10000)/100; if (tcan[cid][canpty[i]]) { delta=(Math.round((pct-(tcan[cid][canpty[i]]/allvotesp*100))*100)/100); } else { delta=pct; } //delta=(Math.round((pct-(canvotes[i]/1.000000*100))*100)/100); if (didcan[i] != 'Y' && delta <= most && delta >= newmost) { newmost=delta; mostid=i; } } } most=newmost; didcan[mostid]='Y'; pct=Math.round((canv[cid][mostid]/totalvotes)*10000)/100; var pvotes=tcan[cid][canpty[mostid]]; var ppct=Math.round(pvotes/allvotesp*10000)/100; if (typeof pvotes === 'undefined') { pvotes=0; ppct=0; } if (tcan[cid][canpty[mostid]]) { delta=(Math.round((pct-(pvotes/allvotesp*100))*100)/100); } else { delta=pct; } if (curType == 'P') { var tname=canname[canptyv[canpty[mostid]]]; } else { var tname=canname[canptyv[canpty[mostid]]]; } if (typeof tname === 'undefined') { tname='n/a'; } contentString+='<tr><td bgcolor="'+cancolor[mostid]+'"> </td><td>'+canname[mostid]+'</td><td align="right">'+pct+'%</td><td align="right">'+canv[cid][mostid]+'</td>'; contentString+='<td style="border-left:1px solid black;">'+tname+'</td>'; contentString+='<td align="right">'+ppct+'%</td>'; contentString+='<td align="right">'+pvotes+'</td>'; if (delta >= 0) { delta='+'+delta; } contentString+='<td align="right" style="border-left:1px solid black;">'+delta+'%</td>'; contentString+='</tr>'; } } } else if (mtype != 'dr') { for(var j in canv[cid]) { if (document.getElementById('MpCn'+j) && document.getElementById('MpCn'+j).checked) { var newmost=0; var totalvotes=0; for(var i in canv[cid]) { if (document.getElementById('MpCn'+i) && document.getElementById('MpCn'+i).checked) { totalvotes+=canv[cid][i]; if (didcan[i] != 'Y' && canv[cid][i] <= most && canv[cid][i] >= newmost) { newmost=canv[cid][i]; mostid=i; } } } most=newmost; didcan[mostid]='Y'; var pct=Math.round((canv[cid][mostid]/totalvotes)*10000)/100; contentString+='<tr><td bgcolor="'+cancolor[mostid]+'"> </td><td>'+canname[mostid]+'</td><td align="right">'+pct+'%</td><td align="right">'+canv[cid][mostid]+'</td>'; contentString+='</tr>'; } } } else { var demosel=document.getElementById('SelDemographic').value; var demoval=demosel.split(': '); var demopct=parseInt(demog[milk][cid]['Demographics'][demoval[0]][demoval[1]])/parseInt(demog[milk][cid]['Demographics']['Population']['Population'])*100; contentString+='<tr><td> </td><td>'+demosel+'</td><td align="right">'+demopct.toFixed(2)+'%</td></tr>'; } contentString+='</table>'; $('#MapLocDetails').html(contentString); $('#MapLocDetails').show(); } function remRaceInfo(e) { $('#MapLocDetails').hide(); } function goRaceInfo(e) { if (e.target.feature !== undefined) { var feature=e.target.feature; var cid=feature.geometry.properties.cid; } else { var cid=e.target.options.cid; } if (raceid[cid] > 0) { window.location='RaceDetail.html?RaceID='+raceid[cid]; } else if (curType == 'P') { window.location='VotingDistrictEdit.html?VotingDistrictID='+cid; } else { window.location='ContainerDetail.html?ContainerID='+cid; } } function infoWinKilled() { infowindow=null; } function rollToMap(cid) { for (m=0; m<mpoly.length; m++) { var milk=mpidd[m+1]; if (mpoly[milk]) { for (i=0; i<mpoly[milk].length; i++) { if (mpcid[milk][i] == cid) { pcolor=dopoly[milk][i].strokeColor; dopoly[milk][i].setOptions({strokeColor:'#ffffff',zIndex:20}); } } } } } function rollOutToMap(cid) { for (m=0; m<mpoly.length; m++) { var milk=mpidd[m+1]; if (mpoly[milk]) { for (i=0; i<mpoly[milk].length; i++) { if (mpcid[milk][i] == cid) { dopoly[milk][i].setOptions({strokeColor:pcolor,zIndex:0}); } } } } } function loadDemographics(milk) { } </script> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td class="Headline1" align="center" style="text-transform:uppercase;">World Countries Map MAP</td></tr> <tr><td class="Switch0"> <script type="text/javascript"> var mymap; var multipolygon; function pageLoaded() { //alert('Page Loaded'); leafletMap(); $( window ).resize(function() { var ratio=lldistance(18.92548,-178.2166,71.35144,-178.2166,'K')/lldistance(18.92548,-178.2166,18.92548,-66.97083,'K'); setMapRatio(ratio); mymap.fitBounds([[18.92548,-178.2166],[71.35144,-66.97083]]); }); } function setMapRatio(mratio) { var mwidth=$('#map_canvas').outerWidth(); var mheight=Math.ceil(mwidth*mratio); if (mheight > 400) { mheight=400; } $('#map_canvas').height(mheight); } function lldistance(lat1, lon1, lat2, lon2, unit) { var radlat1 = Math.PI * lat1/180 var radlat2 = Math.PI * lat2/180 var theta = lon1-lon2 var radtheta = Math.PI * theta/180 var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); if (dist > 1) { dist = 1; } dist = Math.acos(dist) dist = dist * 180/Math.PI dist = dist * 60 * 1.1515 if (unit=="K") { dist = dist * 1.609344 } if (unit=="N") { dist = dist * 0.8684 } return dist } function leafletMap() { mymap = L.map('map_canvas'); var ratio=lldistance(18.92548,-178.2166,71.35144,-178.2166,'K')/lldistance(18.92548,-178.2166,18.92548,-66.97083,'K'); setMapRatio(ratio); mymap.fitBounds([[18.92548,-178.2166],[71.35144,-66.97083]]); var jsonpoly=JSON.parse('{"type":"FeatureCollection","properties":{"id":"999","name":"Test"},"features":[{"type":"Feature","geometry":{"type":"MultiPolygon","properties":{"id":"99999"},"coordinates":[[[[-164.2709,60.78291],[-164.4124,60.55277],[-163.9514,60.78055],[-163.7868,60.5777],[-163.4272,60.7027],[-163.8888,60.85432],[-163.5551,60.89711],[-163.673,60.99068],[-164.0461,60.85694],[-164.6165,60.92713],[-165.1503,60.92805],[-164.8221,61.10305],[-165.3172,61.19279],[-165.3669,61.2018],[-165.2806,61.25822],[-164.7194,61.62534],[-165.1976,61.40652],[-165.4063,61.20588],[-165.3867,61.0686],[-165.8736,61.33263],[-165.816,61.5343],[-166.1708,61.54583],[-166.1477,61.71378],[-165.827,61.68124],[-166.0927,61.81596],[-165.6333,61.84694],[-165.7015,62.11597],[-165.2472,62.4461],[-164.8975,62.53138],[-164.6864,62.38027],[-164.8478,62.56933],[-164.4934,62.74673],[-164.786,62.65235],[-164.8768,62.83805],[-164.6983,63.01923],[-164.3181,63.00965],[-164.5845,63.13409],[-164.4011,63.21499],[-163.1117,63.05193],[-162.306,63.54062],[-161.4415,63.45777],[-160.8181,63.71638],[-160.9483,64.19942],[-161.189,64.41415],[-161.5292,64.41887],[-160.8076,64.62652],[-161.1377,64.91039],[-162.1078,64.71624],[-162.7903,64.33611],[-163.17,64.65526],[-163.3526,64.59068],[-163.0406,64.51832],[-163.1387,64.41269],[-163.8219,64.58916],[-165.0406,64.44498],[-166.4028,64.65596],[-166.3872,64.88846],[-166.9529,65.22165],[-166.6117,65.12109],[-166.1547,65.29359],[-167.4624,65.42012],[-168.1264,65.66998],[-166.2599,66.18012],[-165.5113,66.15714],[-165.8709,66.22144],[-165.7571,66.32124],[-164.2906,66.59804],[-163.6424,66.56672],[-163.9318,66.57805],[-163.7564,66.51554],[-163.8575,66.27624],[-164.174,66.19067],[-161.8164,65.97499],[-161.5751,66.25166],[-161.1053,66.24387],[-161.1494,66.11581],[-161.0006,66.24665],[-161.52,66.40221],[-161.9135,66.27665],[-161.9004,66.53013],[-162.5047,66.74012],[-162.6061,66.91055],[-162.3026,66.94553],[-162.0779,66.66352],[-161.5943,66.4472],[-161.1861,66.53859],[-160.7833,66.37109],[-160.2608,66.3936],[-160.2403,66.64415],[-161.4973,66.53332],[-161.8978,66.72832],[-161.5372,66.99275],[-162.4608,66.99815],[-162.3836,67.16374],[-162.5595,67.01041],[-163.7272,67.11221],[-164.1241,67.60999],[-166.8236,68.34873],[-166.3726,68.41676],[-166.2324,68.87234],[-163.9042,69.01694],[-163.157,69.3522],[-163.0039,69.75278],[-161.9617,70.29984],[-161.767,70.25723],[-162.1142,70.1543],[-161.865,70.16138],[-159.9291,70.58693],[-160.1939,70.47012],[-159.8361,70.26833],[-159.8195,70.48442],[-159.3056,70.53068],[-160.1216,70.61234],[-159.5228,70.82805],[-159.171,70.87748],[-159.4454,70.77818],[-159.2239,70.70444],[-157.9794,70.83749],[-156.5967,71.35144],[-155.5925,71.16832],[-156.1773,70.91776],[-155.9874,70.90054],[-155.9736,70.75583],[-155.0744,71.14888],[-155.0621,71.01027],[-154.8211,71.09499],[-154.5957,71.00193],[-154.6126,70.82762],[-154.2036,70.77652],[-153.2225,70.92859],[-152.2772,70.84055],[-152.4927,70.6461],[-152.0774,70.57839],[-152.6195,70.55839],[-151.7366,70.55859],[-151.9703,70.44567],[-149.1747,70.49081],[-144.9522,69.96832],[-143.2155,70.11026],[-141.003,69.64236],[-140.9955,60.30721],[-139.9794,60.18777],[-139.0669,60.34472],[-139.1614,60.07027],[-137.5908,59.2386],[-137.4718,58.90665],[-136.8095,59.16672],[-136.5839,59.16332],[-136.4636,59.46971],[-136.2339,59.52583],[-136.3451,59.60166],[-135.4736,59.80193],[-135.0145,59.5675],[-135.0917,59.42694],[-134.9519,59.27999],[-133.43,58.45916],[-132.2267,57.20471],[-132.3242,57.08916],[-132.0275,57.03638],[-132.1031,56.86666],[-131.8617,56.79583],[-131.8244,56.5984],[-130.0886,56.11805],[-130.0151,55.90918],[-130.1744,55.75722],[-129.9937,55.28104],[-130.366,54.90443],[-130.7093,54.76788],[-130.7427,54.95509],[-130.8939,54.78055],[-130.9822,55.0511],[-130.7021,55.11477],[-130.4742,55.32593],[-130.7278,55.12638],[-130.8423,55.12676],[-131.0588,55.12749],[-130.9315,55.28465],[-130.6161,55.2943],[-130.8613,55.31006],[-130.8864,55.70791],[-131.1695,55.94166],[-131.0128,56.10652],[-131.9006,55.85527],[-131.7591,55.81409],[-131.8369,55.63583],[-131.9625,55.4986],[-132.1431,55.5675],[-132.2453,55.72388],[-131.9475,55.9645],[-131.9568,56.16492],[-131.7697,56.19694],[-131.993,56.35818],[-132.3417,56.52332],[-132.3157,56.63337],[-132.5511,56.6377],[-132.365,56.81715],[-132.7689,56.84388],[-132.8041,57.08381],[-133.5084,57.1936],[-133.066,57.34679],[-133.4413,57.35541],[-133.5068,57.48429],[-133.3179,57.59006],[-133.5994,57.57451],[-133.6406,57.69638],[-133.0064,57.51395],[-133.5178,57.74583],[-133.5443,57.90815],[-133.1311,57.85333],[-133.5576,57.9236],[-133.7006,57.79152],[-133.813,57.97293],[-133.6802,58.14596],[-133.9133,57.98013],[-134.0597,58.07888],[-134.009,58.38993],[-133.774,58.515],[-133.9727,58.49784],[-134.1806,58.19707],[-134.5401,58.35973],[-134.7576,58.38197],[-134.975,58.64583],[-135.3478,59.46416],[-135.4597,59.29082],[-135.3034,59.09284],[-135.5467,59.22533],[-135.0855,58.23305],[-135.3212,58.24972],[-135.4709,58.47145],[-135.9104,58.3811],[-135.8365,58.53819],[-136.0657,58.81833],[-135.7659,58.89596],[-136.1641,59.02742],[-136.0944,58.86249],[-136.2365,58.75173],[-136.9859,59.04712],[-137.0386,59.06791],[-137.0516,59.02812],[-137.1186,58.8227],[-136.578,58.83944],[-136.3429,58.68034],[-136.5192,58.61027],[-136.2871,58.6618],[-136.0808,58.51167],[-136.0829,58.34027],[-136.4794,58.41582],[-136.3674,58.29853],[-136.6478,58.3345],[-136.6589,58.21652],[-138.5995,59.12322],[-138.4392,59.18464],[-139.7105,59.49583],[-139.4812,59.98506],[-139.317,59.86999],[-139.29,59.57277],[-139.2708,59.80082],[-138.8997,59.80534],[-139.5,60.03305],[-140.4034,59.69804],[-141.3766,59.86639],[-141.257,59.99597],[-141.3849,60.13791],[-141.731,59.95333],[-142.7172,60.10999],[-143.9006,59.9911],[-144.9315,60.29736],[-144.6114,60.71555],[-145.2885,60.35069],[-145.8594,60.49166],[-145.6254,60.667],[-146.2442,60.63597],[-146.0381,60.79569],[-146.644,60.69408],[-146.1253,60.84541],[-146.7554,60.95249],[-146.2968,61.1293],[-147.3669,60.88777],[-147.537,60.91737],[-147.551,61.15318],[-147.6044,60.89569],[-147.7872,60.82166],[-148.0503,60.94735],[-147.7157,61.27541],[-148.0715,61.01777],[-148.1838,61.03015],[-148.3446,60.81249],[-148.6924,60.78812],[-148.4593,60.79749],[-148.6603,60.67125],[-148.2297,60.76583],[-148.2046,60.61749],[-148.6871,60.45159],[-148.0855,60.60013],[-147.9379,60.45138],[-148.3661,60.24722],[-148.0989,60.20597],[-148.3243,60.16319],[-148.4385,59.94846],[-149.0775,60.05638],[-149.2753,59.86749],[-149.4197,60.11624],[-149.6209,59.83201],[-149.7343,59.95468],[-149.7508,59.65915],[-150.0278,59.79631],[-149.9183,59.71312],[-150.0136,59.62749],[-150.3447,59.46652],[-150.2247,59.71548],[-150.4867,59.46388],[-150.5417,59.59166],[-150.9075,59.24332],[-151.7461,59.16249],[-151.9762,59.27583],[-151.8992,59.40804],[-151.4531,59.46749],[-150.9979,59.78083],[-151.4692,59.63673],[-151.8783,59.75999],[-151.3026,60.38833],[-151.4067,60.72811],[-150.4042,61.0368],[-149.0297,60.85166],[-150.062,61.15777],[-149.252,61.49249],[-149.6875,61.47485],[-150.0714,61.245],[-150.6264,61.28638],[-151.7408,60.90471],[-151.7097,60.73186],[-152.2251,60.55735],[-152.4218,60.29326],[-153.0789,60.29819],[-152.5961,60.09444],[-152.7163,59.91659],[-153.2258,59.86513],[-153.002,59.8193],[-153.0426,59.70944],[-153.3483,59.6286],[-153.4206,59.76611],[-154.0672,59.34554],[-154.257,59.13277],[-154.1803,59.02944],[-153.4235,58.98082],[-153.2612,58.85957],[-153.4478,58.71444],[-154.1027,58.48006],[-154.0051,58.382],[-154.3542,58.27833],[-154.1146,58.28041],[-154.2357,58.13069],[-155.0334,58.01461],[-155.3111,57.73444],[-155.6069,57.7893],[-155.7344,57.55138],[-156.49,57.33111],[-156.3417,57.17083],[-156.5523,56.97888],[-156.9408,56.96249],[-157.2067,56.77055],[-157.4279,56.85749],[-157.5833,56.70735],[-157.4701,56.62027],[-157.7872,56.67833],[-158.1157,56.56058],[-157.8826,56.46749],[-158.4285,56.44013],[-158.6374,56.25874],[-158.1264,56.2352],[-158.5053,55.98888],[-158.6004,56.10096],[-158.4842,56.17978],[-158.6011,56.18804],[-158.6754,55.95423],[-159.3615,55.87436],[-159.6672,55.57722],[-159.624,55.81207],[-159.8426,55.85027],[-160.5078,55.47804],[-160.6331,55.56667],[-161.2489,55.34791],[-161.5099,55.36839],[-161.4837,55.48346],[-161.1453,55.53027],[-161.5625,55.62276],[-162.0432,55.23013],[-161.9753,55.09916],[-162.445,55.03643],[-162.6364,55.29736],[-162.5669,54.95798],[-162.8739,54.93097],[-163.1794,55.13958],[-163.0531,54.93266],[-163.3306,54.80819],[-163.3262,55.11708],[-162.5489,55.34249],[-162.2606,55.67305],[-161.7767,55.89319],[-161.0683,55.93499],[-160.6796,55.69582],[-160.7901,55.87756],[-160.2501,55.77152],[-160.574,55.99374],[-160.347,56.28555],[-159.035,56.80499],[-158.639,56.76291],[-158.6508,57.0511],[-158.1153,57.35805],[-157.7417,57.56221],[-157.3979,57.49277],[-157.7042,57.63735],[-157.6114,58.08402],[-157.139,58.16444],[-157.5432,58.26624],[-157.5514,58.38777],[-156.7818,59.15124],[-157.1119,58.87444],[-158.3183,58.64583],[-158.5592,58.80819],[-158.4881,59.00076],[-157.9928,58.90499],[-158.5386,59.17374],[-158.4972,59.04396],[-158.6961,58.88277],[-158.8212,58.96846],[-158.7789,58.77388],[-158.9114,58.76707],[-158.7109,58.49277],[-158.8383,58.40249],[-159.0629,58.4286],[-159.6209,58.94409],[-159.9143,58.77041],[-160.3228,59.05833],[-161.6322,58.59916],[-162.166,58.65513],[-161.6992,58.76332],[-161.7928,59.01721],[-161.5684,59.10666],[-161.994,59.14708],[-161.9558,59.38069],[-161.7096,59.49694],[-162.2365,60.06361],[-162.1561,60.24492],[-162.3696,60.16943],[-162.2219,60.58167],[-161.8794,60.70222],[-162.2617,60.61638],[-162.5695,60.31638],[-162.5107,60.00083],[-163.6595,59.79499],[-164.1382,59.84763],[-164.2142,59.95006],[-164.0942,59.97777],[-165.1384,60.44096],[-164.9796,60.54041],[-165.3856,60.51721],[-164.7246,60.90063],[-164.7101,60.90902],[-164.6683,60.89701]]],[[[-171.7389,63.38055],[-171.8508,63.50861],[-171.7292,63.78937],[-171.54,63.61388],[-170.3,63.69415],[-169.5244,63.35416],[-168.7009,63.29054],[-168.85,63.15527],[-169.3212,63.18457],[-169.6704,62.94415],[-169.8053,63.12526],[-170.5336,63.31363],[-170.8633,63.41851],[-170.9283,63.41569],[-170.9331,63.41548]]],[[[-172.6705,60.33249],[-173.051,60.49582],[-172.9149,60.60152],[-172.28,60.30277]]],[[[-146.5974,60.23888],[-146.4855,60.36569],[-146.7228,60.37624],[-146.5808,60.48249],[-146.097,60.39277]]],[[[-147.7575,60.16791],[-147.9097,60.23472],[-147.7799,60.47874],[-147.6336,60.42249]]],[[[-165.6843,60.29652],[-165.5431,59.98026],[-166.2092,59.85749],[-166.1225,59.75527],[-167.4181,60.18942],[-166.1092,60.41027]]],[[[-147.5311,59.85194],[-147.9103,59.79256],[-147.1936,60.35332],[-146.9378,60.28638]]],[[[-160.6898,58.81472],[-160.9256,58.56305],[-161.1131,58.65527]]],[[[-153.2213,58.1936],[-152.9022,58.16749],[-153.1043,58.26167],[-152.7978,58.28277],[-152.6542,58.47804],[-151.9657,58.32333],[-152.1,58.14957],[-152.2742,58.26222],[-152.2772,58.12944],[-153.0381,58.0536]]],[[[-134.9501,58.40548],[-134.6683,58.15985],[-134.1731,58.15978],[-133.9139,57.81277],[-133.9603,57.68443],[-134.2886,58.07722],[-134.2711,57.8736],[-133.8741,57.48916],[-134.0563,57.46555],[-133.8626,57.36555],[-134.1712,57.38089],[-134.0767,57.26902],[-134.4777,57.02909],[-134.6133,57.22499],[-134.3165,57.33152],[-134.5708,57.48735],[-134.353,57.54131],[-134.5733,57.50583]]],[[[-134.2614,58.19867],[-134.608,58.23777],[-134.5397,58.31213],[-134.5158,58.33804],[-134.3683,58.25722]]],[[[-136.4037,57.82273],[-136.3373,57.98888],[-136.0336,57.84694],[-136.4183,58.08971],[-136.3479,58.22041],[-136.1672,58.09805],[-135.7793,58.27513],[-135.4835,58.15805],[-135.7078,57.97832],[-135.4065,58.13749],[-134.9358,58.03194],[-134.97,57.88527],[-135.1987,57.93687],[-134.9647,57.80958],[-135.1236,57.77444],[-135.8803,57.99249],[-135.297,57.73166],[-134.9311,57.75944],[-134.8545,57.45874],[-135.8009,57.75989],[-135.5459,57.46576],[-135.8354,57.38708],[-136.2019,57.74722]]],[[[-152.8915,57.99062],[-153.3697,58.04041],[-153.2581,58.13638]]],[[[-136.3304,58.0075],[-136.4419,57.84583],[-136.5556,58.01708],[-136.4544,58.0886]]],[[[-153.9293,57.80833],[-153.6431,57.8661],[-153.5062,57.62846],[-153.3205,57.72725],[-153.4707,57.84089],[-153.0512,57.83027],[-153.2586,58.00236],[-152.8135,57.90957],[-152.8775,57.72887],[-152.4772,57.90318],[-152.3299,57.81892],[-152.5516,57.70423],[-152.1523,57.60819],[-152.3618,57.42305],[-153.0245,57.47124],[-152.6339,57.31777],[-153.1669,57.34603],[-152.9565,57.25576],[-153.2571,57.22818],[-153.7274,57.06096],[-153.5542,56.98027],[-153.986,56.73846],[-154.1205,56.78999],[-153.7387,57.12874],[-154.0997,56.96486],[-154.0206,57.10767],[-154.1097,57.11051],[-154.2978,56.84888],[-154.6096,57.26097],[-154.7995,57.28333],[-154.2072,57.66666],[-153.635,57.27597],[-153.8695,57.64333],[-153.5978,57.59888]]],[[[-135.1243,56.82777],[-135.3674,56.83221],[-135.3383,57.2452],[-135.6675,57.34579],[-135.4783,57.36388],[-135.4397,57.54444],[-134.9454,57.36486],[-134.6189,56.72874],[-134.6546,56.1661],[-135.0475,56.53097],[-134.8468,56.68361],[-135.0892,56.59388]]],[[[-135.5462,57.13221],[-135.8269,56.98582],[-135.7128,57.16291],[-135.8458,57.3193],[-135.7003,57.31694]]],[[[-152.8947,57.13583],[-153.4067,57.06972],[-153.2719,57.17606],[-153.2342,57.20583],[-153.1901,57.19674]]],[[[-132.9338,56.62978],[-133.3472,56.83763],[-133.0827,56.53263],[-133.5756,56.4336],[-133.6993,56.82958],[-133.8818,56.89807],[-133.7413,56.89499],[-134.0181,57.01472],[-133.0517,56.97749]]],[[[-134.2317,56.41916],[-134.0346,56.37735],[-134.0646,56.54805],[-134.304,56.55819],[-134.4047,56.84777],[-133.9905,56.87263],[-133.975,56.63555],[-133.7193,56.76902],[-133.7386,56.56055],[-133.9212,56.6111],[-133.9461,56.08916],[-134.0567,56.31166],[-134.1261,55.99763],[-134.2203,56.27694]]],[[[-132.5293,56.5811],[-132.9304,56.50444],[-132.8019,56.78638]]],[[[-132.3462,56.27097],[-132.3496,56.29922],[-132.3718,56.48721],[-132.0141,56.33638],[-131.995,56.32833],[-131.9957,56.32588],[-132.0561,56.11138],[-132.2217,56.20247]]],[[[-132.9893,56.42124],[-132.6385,56.43596],[-132.6403,56.28319],[-132.8342,56.23082]]],[[[-132.6964,56.2193],[-132.4178,56.35083],[-132.3946,56.22142],[-132.1072,56.11583],[-132.1198,55.93513],[-132.3189,55.91221]]],[[[-133.127,55.49103],[-132.9211,55.62464],[-133.383,55.64075],[-133.1419,55.81638],[-133.2651,56.15485],[-133.6328,56.27388],[-133.1802,56.32729],[-133.0729,56.05131],[-132.6218,55.91957],[-132.1418,55.47569],[-132.5625,55.56777],[-132.0883,55.2676],[-132.2353,55.19312],[-131.9858,55.25958],[-132.2135,54.99374],[-131.9726,55.02971],[-132.0072,54.68999],[-132.5733,54.9486],[-132.6507,55.24381],[-132.6551,55.13874],[-133.2128,55.27784],[-132.9867,55.37305]]],[[[-133.3636,56.00737],[-133.7931,55.93138],[-133.5714,56.12721],[-133.2856,56.12888]]],[[[-131.3477,55.64312],[-131.3286,55.42583],[-131.3745,55.39092],[-131.4588,55.3268],[-131.4939,55.50555],[-131.5186,55.29458],[-131.8192,55.45363],[-131.6849,55.83027],[-131.2596,55.96027],[-130.935,55.6368],[-130.9681,55.38819],[-131.1421,55.19888],[-131.2811,55.22638],[-131.218,55.40305],[-131.3889,55.255],[-131.2747,55.43256]]],[[[-131.6219,55.29277],[-131.7222,55.13666],[-131.8195,55.41277]]],[[[-160.4643,55.18679],[-160.8139,55.11791],[-160.8465,55.3325],[-160.6956,55.39999]]],[[[-159.8408,55.13596],[-160.2256,54.87527],[-160.1934,55.11325],[-159.8716,55.27805]]],[[[-131.355,55.03555],[-131.5939,54.99388],[-131.5817,55.25472],[-131.4672,55.23582]]],[[[-132.68,54.6661],[-133.1225,54.93943],[-133.2136,55.09221],[-133.1022,55.24554]]],[[[-164.6639,54.39194],[-164.9523,54.5802],[-164.4911,54.91457],[-163.7775,55.0554],[-163.5364,55.04729],[-163.375,54.7918],[-163.0549,54.66812],[-164.1761,54.60416]]],[[[-166.1217,54.11443],[-165.9779,54.2154],[-165.659,54.12234],[-165.8975,54.02887]]],[[[-166.7664,53.68582],[-167.1524,53.82388],[-167.0204,53.95665],[-166.6315,53.99971],[-166.6036,53.82903],[-166.3752,54.00103],[-166.2151,53.92096],[-166.5708,53.71027],[-166.2754,53.68123],[-166.7566,53.44527],[-167.8426,53.30637],[-167.0464,53.59388]]],[[[-169.0867,52.82805],[-168.6214,53.27222],[-168.3572,53.26236],[-168.354,53.47332],[-167.7953,53.49554]]],[[[-174.2792,52.20998],[-174.4462,52.30673],[-174.18,52.41763],[-173.9908,52.32214],[-174.2094,52.09888],[-174.9792,52.0547]]],[[[-174.0568,52.12305],[-172.959,52.08388],[-173.495,52.01499]]],[[[-176.7584,51.95083],[-176.5598,51.98471],[-176.6422,51.85722],[-176.4236,51.82777],[-176.9386,51.58443]]],[[[-178.2166,51.87429],[-177.9307,51.91647],[-177.8253,51.8311],[-177.9078,51.59193]]],[[[-177.0478,51.90318],[-177.1539,51.69942],[-177.6422,51.64944]]],[[[-67.03444,44.98499],[-67.17861,44.89916],[-66.97083,44.82791],[-67.18999,44.66027],[-68.26257,44.46579],[-68.61583,44.30638],[-68.81319,44.33027],[-68.79687,44.57461],[-68.98083,44.44172],[-69.06556,44.0661],[-69.24834,43.93804],[-69.37,44.04694],[-69.50042,43.85041],[-69.64306,44.02888],[-69.7193,43.79208],[-69.7716,44.0743],[-69.83139,43.71617],[-69.92223,43.86472],[-70.1725,43.78055],[-70.19187,43.57555],[-70.7234,43.11992],[-70.80597,42.7159],[-70.58181,42.65284],[-71.03951,42.30485],[-70.71764,42.21388],[-70.68222,41.99722],[-70.33292,41.71388],[-70.01931,41.79256],[-70.24402,42.07395],[-70.07417,42.05888],[-69.93541,41.6725],[-70.64861,41.53944],[-70.7261,41.72777],[-71.18832,41.46832],[-71.11485,41.78951],[-71.27139,41.65305],[-71.38944,41.80669],[-71.51167,41.36999],[-72.90639,41.28611],[-73.93416,40.79805],[-73.93804,40.9129],[-74.26299,40.46638],[-73.99566,40.45885],[-73.95222,40.3],[-74.08826,39.77485],[-74.0716,40.04784],[-74.42041,39.35399],[-74.94527,38.92298],[-74.89494,39.16902],[-75.4157,39.37804],[-75.55722,39.62041],[-75.02852,40.01231],[-75.58861,39.64888],[-75.03972,38.4575],[-75.86806,37.21693],[-76.00279,37.22388],[-75.95639,37.49777],[-75.64404,37.96117],[-75.87853,37.94756],[-75.84635,38.39878],[-76.03751,38.22665],[-76.24695,38.51028],[-76.26529,38.61971],[-75.96278,38.61333],[-76.34216,38.68826],[-76.25517,38.84103],[-76.10444,38.79909],[-76.22466,38.96409],[-76.35986,38.85541],[-76.07246,39.14166],[-76.22084,39.06082],[-76.16833,39.31652],[-75.85139,39.53583],[-75.94083,39.60416],[-76.48,39.30207],[-76.4164,39.20972],[-76.61052,39.25037],[-76.39389,39.01104],[-76.53751,38.73166],[-76.37857,38.3652],[-76.67916,38.66253],[-76.66347,38.47471],[-76.37111,38.28833],[-76.31235,38.0473],[-77.04445,38.43832],[-77.24374,38.39826],[-77.00612,38.755],[-77.06169,38.90457],[-77.04222,38.72662],[-77.3264,38.40249],[-76.24361,37.9061],[-76.35361,37.6186],[-77.12989,38.16912],[-76.2907,37.56861],[-76.23944,37.37346],[-76.37649,37.28051],[-76.68277,37.42972],[-76.29146,37.00534],[-76.65388,37.22694],[-77.23222,37.29639],[-76.29361,36.84332],[-76.25514,36.95791],[-75.98729,36.90923],[-75.53265,35.80152],[-75.9453,36.71242],[-75.89958,36.49277],[-76.03473,36.49666],[-75.79315,36.07385],[-75.97604,36.31138],[-75.92654,36.17089],[-76.19965,36.31739],[-76.07097,36.1493],[-76.51862,36.00694],[-76.7461,36.22818],[-76.72952,35.93985],[-76.07751,35.99319],[-76.13563,35.69239],[-76.02875,35.65409],[-75.85083,35.97527],[-75.72083,35.69263],[-76.14917,35.33694],[-76.49611,35.38472],[-76.5882,35.55103],[-76.6525,35.41499],[-77.04958,35.52694],[-76.46889,35.27166],[-76.7614,34.98777],[-77.06816,35.14978],[-76.75307,34.90527],[-76.31264,35.01263],[-76.50063,34.73617],[-77.30958,34.55972],[-77.42888,34.74194],[-77.38173,34.51645],[-77.70528,34.34193],[-77.93443,33.92694],[-77.95563,34.14902],[-78.02597,33.88937],[-78.60056,33.87083],[-79.19644,33.27894],[-79.27139,33.37332],[-79.20584,33.16554],[-79.38834,33.00819],[-79.81583,32.76721],[-79.94263,32.85347],[-79.91722,32.66249],[-80.32772,32.48041],[-80.6693,32.52291],[-80.465,32.31749],[-80.63138,32.25639],[-80.83237,32.51999],[-80.67229,32.21708],[-81.1659,31.56486],[-81.32903,31.55479],[-81.20473,31.47472],[-81.53375,30.84944],[-81.38612,30.26111],[-81.0139,29.24305],[-80.6088,28.61263],[-80.84361,28.78097],[-80.75723,28.42069],[-80.03534,26.79569],[-80.39751,25.18666],[-81.14668,25.16041],[-81.13561,25.32054],[-80.91785,25.24687],[-81.3409,25.80972],[-81.73659,25.95944],[-81.96931,26.48183],[-81.78593,26.7069],[-82.02338,26.52922],[-82.01723,26.96472],[-82.19194,26.93805],[-82.15889,26.78288],[-82.39639,26.96236],[-82.65527,27.46166],[-82.42416,27.91944],[-82.69125,28.02986],[-82.59507,27.82187],[-82.72472,27.65805],[-82.85416,27.85861],[-82.6286,28.69638],[-82.80278,29.15499],[-83.07167,29.22444],[-84.01098,30.09764],[-85.34167,29.67638],[-85.30721,29.81597],[-85.62939,30.10463],[-85.39389,30.04152],[-85.74695,30.29722],[-85.84555,30.24708],[-85.72556,30.12583],[-86.33736,30.38444],[-86.10423,30.37909],[-86.26,30.49583],[-87.1261,30.36388],[-86.93639,30.45],[-87.16084,30.51777],[-87.52256,30.27929],[-87.42039,30.48095],[-87.56862,30.27944],[-88.02135,30.22548],[-87.75771,30.28243],[-88.02028,30.70111],[-88.13145,30.31895],[-88.98083,30.41833],[-89.59312,30.15326],[-90.21375,30.38694],[-90.415,30.20347],[-90.17014,30.02347],[-89.67354,30.16715],[-89.84375,30.00708],[-89.65805,29.87389],[-89.39944,30.05083],[-89.40417,29.7625],[-89.75272,29.63298],[-89.00876,29.17416],[-89.405,28.92666],[-89.27202,29.14965],[-89.38958,29.09208],[-90.1825,29.56986],[-90.02653,29.42513],[-90.11597,29.13902],[-90.24777,29.0825],[-90.44444,29.32611],[-90.76501,29.10944],[-91.27792,29.25583],[-91.12653,29.34736],[-91.83882,29.82826],[-92.14862,29.76889],[-92.09973,29.61555],[-92.30833,29.53972],[-93.24083,29.785],[-93.85049,29.70881],[-93.79666,29.99416],[-93.95847,29.81666],[-93.85844,29.68163],[-94.75417,29.36791],[-94.47659,29.55889],[-94.76584,29.56805],[-94.75702,29.785],[-95.06007,29.71506],[-94.8875,29.38527],[-95.14861,29.05125],[-96.21201,28.48812],[-95.99068,28.65104],[-96.64473,28.71194],[-96.39997,28.44173],[-96.65931,28.31521],[-96.80034,28.47152],[-96.78084,28.24138],[-97.16937,28.1618],[-97.14417,28.02805],[-97.0225,28.03167],[-97.19451,27.8218],[-97.51709,27.86382],[-97.27972,27.65611],[-97.41299,27.32729],[-97.76934,27.44972],[-97.63389,27.2525],[-97.42937,27.26229],[-97.56041,26.84208],[-97.14074,25.96643],[-97.41723,25.84333],[-99.10474,26.435],[-99.45862,27.04694],[-99.5039,27.56805],[-100.2815,28.28055],[-100.6658,29.10903],[-101.405,29.77278],[-102.3018,29.88798],[-102.6703,29.74277],[-103.1637,28.98403],[-103.375,29.02361],[-104.5418,29.67291],[-104.8965,30.56625],[-106.2099,31.47222],[-106.3958,31.7475],[-108.2086,31.78333],[-108.2083,31.33305],[-111.0458,31.33305],[-114.7952,32.5005],[-114.7191,32.71846],[-117.1224,32.53533],[-117.4808,33.32749],[-118.1082,33.75694],[-118.4,33.74986],[-118.53,34.04791],[-119.1292,34.11388],[-119.5417,34.41415],[-120.6058,34.5586],[-120.6182,35.13944],[-121.8676,36.31534],[-121.8511,36.95069],[-122.379,37.19999],[-122.4843,37.78992],[-122.0058,37.47137],[-122.3934,37.95916],[-121.7915,38.06831],[-122.3653,38.15555],[-122.5055,37.83104],[-122.9564,38.05804],[-122.8078,38.09499],[-123.1072,38.46277],[-123.7015,38.93041],[-123.7724,39.70971],[-124.3758,40.4477],[-124.1431,40.81194],[-124.04,41.42777],[-124.5244,42.8661],[-124.3785,43.31902],[-124.1428,43.37169],[-124.3025,43.40054],[-124.1158,43.72527],[-123.8716,45.52898],[-123.952,46.18111],[-123.1636,46.19519],[-124,46.32361],[-124.0387,46.65665],[-123.9412,46.39298],[-123.9408,46.63666],[-123.7595,46.68562],[-124.0975,46.86138],[-123.8012,46.97679],[-124.075,47.06625],[-124.1642,46.94638],[-124.7143,48.39708],[-123.9347,48.17583],[-122.7494,48.15395],[-122.6303,47.91582],[-122.7473,47.76354],[-122.8493,47.83138],[-123.1479,47.37165],[-122.8406,47.44732],[-123.0842,47.44305],[-122.7288,47.74755],[-122.5656,47.93804],[-122.46,47.76374],[-122.6808,47.63923],[-122.5365,47.59318],[-122.5478,47.28805],[-122.6192,47.42055],[-122.749,47.1893],[-122.7975,47.39527],[-123.0626,47.15596],[-122.8786,47.06416],[-122.3096,47.40457],[-122.4183,47.67222],[-122.3206,48.07417],[-122.5311,48.20513],[-122.3782,48.28472],[-122.6987,48.49479],[-122.4862,48.4527],[-122.4367,48.59041],[-122.7603,48.99944],[-114.0599,49.0006],[-95.15417,48.99944],[-95.15279,49.37666],[-94.81778,49.30555],[-94.60583,48.72443],[-93.78584,48.51708],[-92.95132,48.62263],[-92.35986,48.23173],[-92.03938,48.34534],[-91.41833,48.04111],[-90.86861,48.2375],[-90.74986,48.09277],[-89.35666,47.97971],[-88.36806,48.31221],[-84.86459,46.90582],[-84.565,46.46638],[-84.12534,46.52944],[-83.95432,46.07048],[-83.59612,46.11416],[-83.44777,46.01194],[-83.59778,45.82722],[-82.54306,45.35583],[-82.13028,43.58527],[-82.53583,42.59943],[-83.08696,42.30054],[-83.16861,42.0461],[-82.69666,41.68388],[-78.98694,42.81999],[-79.18472,43.46555],[-78.72472,43.62943],[-76.80945,43.63333],[-76.43736,44.10207],[-74.99612,44.9836],[-71.49416,45.02055],[-71.32111,45.29694],[-70.87659,45.24103],[-70.25806,45.90909],[-70.28778,46.20305],[-70.00917,46.69804],[-69.23606,47.46789],[-68.89153,47.18901],[-68.31486,47.36514],[-67.795,47.06999],[-67.79451,45.69582],[-67.41312,45.58548],[-67.45528,45.26305],[-67.20654,45.18304]]],[[[-123.0343,48.99944],[-123.0718,48.97338],[-123.0938,48.99944]]],[[[-122.5058,48.30749],[-122.6639,48.24471],[-122.37,47.92138],[-122.7568,48.2311],[-122.5883,48.39222]]],[[[-68.24138,44.43888],[-68.22208,44.40411],[-68.1825,44.33277],[-68.40626,44.27138],[-68.29292,44.38653]]],[[[-73.58945,40.92055],[-72.63764,40.98166],[-72.28528,41.16193],[-72.58473,40.9061],[-71.8668,41.07478],[-73.61806,40.59444],[-74.005,40.67999]]],[[[-159.7542,21.97916],[-159.7146,22.15416],[-159.3275,22.20166],[-159.4514,21.86999]]],[[[-158.1006,21.29444],[-158.2735,21.57777],[-157.9439,21.68444],[-157.6656,21.32416],[-157.8131,21.25888]]],[[[-157.304,21.09777],[-156.7505,21.17277],[-156.8675,21.04583]]],[[[-156.6886,20.8861],[-156.5971,21.05138],[-155.9933,20.78249],[-156.3742,20.58083]]],[[[-157.0464,20.91902],[-156.8123,20.84361],[-156.9073,20.73777]]],[[[-155.1833,19.98513],[-154.7978,19.53809],[-155.6631,18.92548],[-155.9003,19.09034],[-156.049,19.73506],[-155.8133,20.00402],[-155.8233,20.2725]]],[[[-75.08719,19.96512],[-75.08528,19.89304],[-75.15862,19.89008],[-75.13974,19.96287]]],[[[-75.16856,19.93077],[-75.22372,19.90155],[-75.22642,19.92444],[-75.19297,19.9606],[-75.15918,19.96069]]]]}}]}'); multipolygon = L.geoJSON(jsonpoly, {color:'#FF0000',opacity:0.8,weight:2,fillColor:'#0000FF',fillOpacity:0.1} ); multipolygon.addTo(mymap); L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { attribution: 'Data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles: <a href="https://www.mapbox.com/">Mapbox</a>', tileSize: 512, zoomOffset: -1, maxZoom: 18, id: 'mapbox/streets-v11', accessToken: 'sk.eyJ1IjoiZW50cm9waXN0IiwiYSI6ImNraG53Y2M0ZzBiNHoyeW1pNTB1Mjc0NXMifQ.eSKmJwV5Qy1g-WELf1rL1g' }).addTo(mymap); var iconSVG='<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 -40 60 60" width="40" height="40"><path fill="#BA0000" fill-opacity="1" d="M0,-36c-9.941,0 -18,8.059 -18,18c0,13.858 18,36 18,36c0,0 18,-22.142 18,-36c0,-9.941 -8.059,-18 -18,-18z M-4,18 L4,18 Z" stroke="#000" stroke-width="3"/> <text x="0" y="-5" fill="#000" font-family="Arial" font-weight="bold" font-size="20" text-anchor="middle" alignment-baseline="middle"> </text></svg>'; var iconSVGblob = new Blob([iconSVG], { type: "image/svg+xml" }); var iconSVGurl = URL.createObjectURL(iconSVGblob); var myIcon = new L.icon({ iconUrl: iconSVGurl, iconSize:[20,20], iconAnchor:[10,20] }); var marker = new L.Marker([40.931210,-73.898747],{icon: myIcon, title:"Gus Hall" }).addTo(mymap); } </script> <div align="center"><div id="map_canvas" style="width:100%; height:300px;"></div></div> </td></tr></table> </IF> <script language="Javascript"> <!-- var cand={ "candidates": [ { "cid": "4191", "color": "#BA0000" } ] }; </script> <script> function drawPollGraph(){ } </script> </td></tr></table> <br> <form method="post" action="RaceDetail.html?RaceID=291807"> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="42"><img src="../images/spacer.gif" width="40" height="15"></td> <td class="Headline1" align="center">CANDIDATES</td> <td width="42"></td></tr></table></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Photo</td><td class="Switch0" align="center" valign="bottom"><a href="CandidateDetail.html?CandidateID=4191" class="Headline1"><img src="../images/candidates/b4/C4191D0000-00-00.jpg" width="75" border="0"></td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Name</td> <td align="center" bgcolor="#BA0000" class="Headline1"> <a href="CandidateDetail.html?CandidateID=4191" class="Headline1">Gus Hall</a></td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Party</td><td class="Text1" align="center" bgcolor="#BA0000"><a href="PartyDetail.html?PartyID=46" class="Headline1">Communist</a></td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Campaign Logo</td><td class="Switch0" align="center"></td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1"> <span style="font-size:11px;">Uncertified</span> Votes</td><td class="Switch0" align="center"><img src="../images/occoolcheck.gif"> 1 (100.00%)</td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Margin</td><td class="Switch0" align="center">0 (0.00%)</td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right"><a href="RaceDetail.html?RaceID=291807&ShowPD=Y" class="Headline1">Predict Avg.</a></td><td class="Switch0" align="center">0.00%</td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Cash On Hand</td><td class="Switch0" align="center" valign="top"> <a href="FinanceReportEdit.html?FinanceReportID=&RaceLink=291807&CandidateLink=4191" class="Text1"> $--</a> </td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Website</td><td class="Switch0" align="center"> </td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Entry Date</td><td class="Switch0" align="center"> -- </td> <td class="Switch0" colspan="6"> </td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1">Bar</td><td colspan="2"><table width="100%" cellspacing="0" cellpadding="0" border="0"><td style="width:100.00%;height:15px;" bgcolor="#BA0000"></td></table></td></tr> <tr bgcolor="#993333"><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center"><a href="RaceDetail.html?RaceID=291807&ShowAllMUPoll=Y" class="Headline1">MATCHUP POLLS (0 from 0 pollsters)</a></td> <td width="42"><a href="PollEdit.html?AttachTo=Race&AttachID=291807"><img src="../images/ButtonAdd.gif" width="40" height="15" border="0"></a></td></tr></table></td></tr> <tr bgcolor="#993333"><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center"><a href="javascript:showAllEndorse()" class="Headline1">ENDORSEMENTS</a></td> <td width="42"><a href="EndorsementEdit.html?RaceLink=291807"><img src="../images/ButtonAdd.gif" width="40" height="15" border="0"></a></td></tr></table></td></tr> <tr><td bgcolor="#333366" align="right" class="Headline1" width="100">Endorsements</td><td class="Switch0" align="center" valign="top"><div class="endorsediv"><table border="0"> </table></div></td> <td class="Switch0" colspan="6"> </td></tr> </IF> </table> </form> <br> <br> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="5"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center"><a href="RaceDetail.html?RaceID=291807&ShowAllEvent=Y" class="Headline1">EVENTS</a></td> <td width="42"></td></tr></table></td></tr> <tr bgcolor="#333366" align="center"> <td class="Headline1">Start Date</td> <td class="Headline1">End Date</td> <td class="Headline1">Type</td> <td class="Headline1">Title</td> <td class="Headline1">Contributor</td> </tr> </table> <br> <script language="javascript"> <!-- function adVideoShow(code,codetype) { d=document.getElementById('AdVideoPlay'); if (codetype == 'Y') { d.innerHTML='<iframe width="250" height="175" src="https://www.youtube.com/embed/'+code+'" frameborder="0" allowfullscreen></iframe>'; } else if (codetype == 'V') { d.innerHTML='<iframe src="https://player.vimeo.com/video/'+code+'" width="250" height="175" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><a href="javascript:adVideoHide()">X</a>'; } else if (codetype == 'B') { d.innerHTML='<embed src="https://c.brightcove.com/services/viewer/federated_f8/1485951475" bgcolor="#FFFFFF" flashVars="videoId='+code+'&playerId=1485951475&viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&servicesURL=https://services.brightcove.com/services&cdnURL=https://admin.brightcove.com&domain=embed&autoStart=false&" base="https://admin.brightcove.com" name="flashObj" width="250" height="175" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed><a href="javascript:adVideoHide()">X</a>'; } else if (codetype == 'I') { d.innerHTML='<object height="175" width="250" data="https://www.iqmediacorp.com/IQMedia_Player_v1.34.swf" type="application/x-shockwave-flash" name="HYETA" id="HUY"> <param value="https://www.iqmediacorp.com/IQMedia_Player_v1.34.swf" name="movie"><param value="true" name="allowfullscreen"><param value="always" name="allowscriptaccess"><param value="high" name="quality"><param value="transparent" name="wmode"><param value="userId=07175c0e-2b70-4325-be6d-611910730968&IsRawMedia=false&embedId='+code+'&PageName=ClipPlayer&EB=false&ServicesBaseURL=2&PlayerFromLocal=false&autoPlayback=false" name="flashvars"></object></IF><a href="javascript:adVideoHide()">X</a>'; } else if (codetype == 'F') { d.innerHTML='<div class="fb-video" style="min-height:175px" data-href="https://www.facebook.com/facebook/videos/'+code+'/" data-width="250" data-show-text="false"></div>'; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); } d.style.display='block'; } function adVideoHide() { document.getElementById('AdVideoPlay').style.display='none'; } //--> </script> <div id="fb-root"></div> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="8"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center">VIDEO ADVERTISEMENTS</td> <td width="42"><a href="AdVideoEdit.html?RaceLink=291807"><img src="../images/ButtonAdd.gif" width="40" height="15" border="0"></a></td></tr></table></td></tr> <tr bgcolor="#333366"><td style="width:260px;" valign="top"><div id="AdVideoPlay" style="display:none;"></div></td><td valign="top"><table class="infotable" cellspacing="0" cellpadding="0" style="width:99%"> <tr bgcolor="#333366" align="center"> <th class="Headline1" style="width:10%">Start Date</th> <th class="Headline1" style="width:20%;">Candidate</th> <th class="Headline1" style="width:10%;">Category</th> <th class="Headline1" style="width:10%;">Ad Tone</th> <th class="Headline1" style="width:5%;">Lng</th> <th class="Headline1" style="width:25%;">Title</th> <th class="Headline1" style="width:10%;">Run Time</th> <th class="Headline1" style="width:10%;">Contributor</th> </tr> </table> <div style="width:100%;height:100%;overflow:auto;"><table class="infotable" cellspacing="0" cellpadding="0" width="100%"> </table></div></td></tr> </table> <br> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="4"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center">BOOKS</td> <td width="42"><a href="BookEdit.html?AttachTo=Race&AttachID=291807"><img src="../images/ButtonAdd.gif" width="40" height="15" border="0"></a></td></tr></table></td></tr> <tr bgcolor="#333366" align="center"> <td class="Headline1">Title</td> <td class="Headline1">Purchase</td> <td class="Headline1">Contributor</td> </tr> </table> <br> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="3"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center">INFORMATION LINKS</td> <td width="42"></td></tr></table></td></tr> </table> <br> <table class="infotable" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#993333"><td colspan="5"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <td width="42"><img src="../images/spacer.gif" width="40" height="15"></td><td class="Headline1" align="center"><a href="RaceDetail.html?RaceID=291807&ShowAllNews=Y" class="Headline1">NEWS</a></td> <td width="42"></td></tr></table></td></tr> <tr bgcolor="#333366" align="center"> <td class="Headline1">Date</td> <td class="Headline1">Category</td> <td class="Headline1">Headline</td> <td class="Headline1">Article</td> <td class="Headline1">Contributor</td> </tr> </table> <br> <script language="javascript"> <!-- var epid=0; var etype=''; var doffset=0; function emotePanel(type,id,e) { if (!e) { var e = window.event; } if (e.pageX || e.pageY) { posx=e.pageX; posy=e.pageY; } else if (e.clientX || e.clientY) { posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft; posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop; } epid=id; etype=type; var p=document.getElementById('EmoteSelect'); p.style.left=(posx - 10) + 'px'; p.style.top=(posy - 5) + 'px'; p.style.display='block'; return false; } function emote(num) { var p=document.getElementById('EmoteSelect'); p.style.display='none'; if (num > 0) { var ajax = new Ajax(); ajax.send_params = 'TYPE='+etype+'&DID='+epid+'&EM='+num; ajax.send_url = 'https://www.ourcampaigns.com/ajax/SetEmote.html'; ajax.send_method = 'GET'; ajax.response_handler = function(resp) { if (resp != '') { document.getElementById('Emote'+etype+epid).innerHTML=resp; } } ajax.sendRequest(); } } function emoteView(type,id,num,e) { if (!e) { var e = window.event; } if (e.pageX || e.pageY) { posx=e.pageX; posy=e.pageY; } else if (e.clientX || e.clientY) { posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft; posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop; } var p=document.getElementById('EmotePeople'); p.style.left=(posx - 10) + 'px'; p.style.top=(posy - 5) + 'px'; var ajax = new Ajax(); ajax.send_params = 'TYPE='+type+'&DID='+id+'&EM='+num; ajax.send_url = 'https://www.ourcampaigns.com/ajax/EmoteViewPeople.html'; ajax.send_method = 'GET'; ajax.response_handler = function(resp) { if (resp != '') { var p=document.getElementById('EmotePeople'); p.innerHTML=resp; p.style.display='block'; } } ajax.sendRequest(); } function emoteBlur(id,num) { var p=document.getElementById('EmotePeople'); p.style.display='none'; } function prevDiscussion(num) { if (doffset > 0) { var ajax = new Ajax(); var odo=doffset; doffset-=num; if (doffset < 0) { doffset=0; } if (doffset < 26) { var ppdiv=document.getElementById('PrevPageDiv'); if (ppdiv) { ppdiv.style.display='none'; } } if (doffset == 0) { var pmdiv=document.getElementById('PreviousMsgTR'); if (pmdiv) { pmdiv.style.display='none'; } } document.getElementById('PreviousCount').innerHTML=''+doffset; ajax.send_params = 'IsAjax=Y&To=Race&RaceID=291807&ODO='+odo+'&DOffset='+doffset+'&IgnoreIDs=0&Sub=0&ArchiveCount=0&Page=RaceDetail.html'; ajax.send_url = 'https://www.ourcampaigns.com/discussion.html'; ajax.send_method = 'GET'; ajax.response_handler = function(resp) { if (resp != '') { var md=document.getElementById('DiscussDiv'); var newdiv=document.createElement('div'); newdiv.innerHTML=resp+' '; md.insertBefore(newdiv,md.firstChild); twttr.widgets.load(); } } ajax.sendRequest(); } } //--> </script> <div id="EmoteSelect" style="display:none;position:absolute;background-color:white;border:2px solid red;padding:4px;width:100px;z-index:300;"><b>Add Your 2¢</b><br><a href="javascript:emote(1)">Agree</a><br><a href="javascript:emote(2)">Disagree</a><br> <a href="javascript:emote(4)">Laugh</a><br><a href="javascript:emote(5)">Groan</a><br><a href="javascript:emote(3)">Troll</a><br><a href="javascript:emote(7)">Befuddled</a><br><a href="javascript:emote(6)">Work Complete</a><br><a href="javascript:emote(8)">Prediction</a><br><a href="javascript:emote(0)">[close]</a><br> </div> <div id="EmotePeople" style="display:none;position:absolute;background-color:white;border:2px solid red;padding:4px;width:100px;" onmouseout="emoteBlur()"> </div> <table class="infotable" cellspacing="0" cellpadding="0"><tr><th colspan="3">DISCUSSION</td></tr> <tr><td colspan="3"><div id="DiscussDiv" class="Switch0"> </td></tr> </table> <script language="JavaScript"> <!-- var fitem=''; function noChangeF(itm) { fitem=itm.value; } function noChangeU(itm) { itm.value=fitem; } function upIRV(fid,vnum) { var snum=vnum-1; var f1=eval('document.UserPoll'+fid+'.UPO'+snum); var f2=eval('document.UserPoll'+fid+'.UPO'+vnum); var fi1=eval('document.UserPoll'+fid+'.UPOI'+snum); var fi2=eval('document.UserPoll'+fid+'.UPOI'+vnum); var ftmp=f1.value; f1.value=f2.value; f2.value=ftmp; ftmp=fi1.value; fi1.value=fi2.value; fi2.value=ftmp; } function pubvotewin(upid) { var prw=window.open('userpollpub.html?UserPollID='+upid,'PubVote','scrollbars=yes,width=500,height=350'); } function quoteMsg(msgid,userid) { f=document.DiscussForm; f.DiscussText.value=f.DiscussText.value + '<q ' + userid + '>' + document.getElementById('MsgC'+msgid).innerHTML + '</q>\n'; } //--> </script> </IF> </td></tr></table> <div align="right"> </div> </td> </tr> </table> </body> </html> <script> if (typeof window.drawLeanGraph === 'undefined') { function drawLeanGraph() {} } </script> </body> </html>