12c12 < Shape Drawing - RJM Programming - June, 2015 --- > Survey Traverse Calculation - RJM Programming - Copyright © 2013 rjmprogramming.com.au all rights reserved. 51d50 < var area = 0.0; 76,77d74 < var initiallength = 0.000; < 79c76 < for ( var i = 0; i < 1; i++) { //prmarr.length; i++) { --- > for ( var i = 0; i < prmarr.length; i++) { 108,109d104 < $xyc = explode(",", $_GET['coords']); < $legs = (sizeof($xyc) - 2) / 2; 126c121 < $htm .= " title: 'Polygon " . $legs . "'\n"; --- > $htm .= " title: 'Survey Traverse'\n"; 147c142 < $posthtm .= " title: 'Polygon " . $legs . "'\n"; --- > $posthtm .= " title: 'Survey Traverse'\n"; 178,259d172 < function svgit(incoords) { < var xxoff = 0.0, yyoff = 0.0, cdelim = "", idelim = "", maxx = 400, maxy = 400, inx = 0.0, iny = 0.0, xz = 0.0, ah = 0.0; < var ourcoords=incoords; < var csvcoords=incoords; < < while (ourcoords.indexOf("],") != -1) { < ourcoords=ourcoords.replace("],", " "); < csvcoords=csvcoords.replace("],", ","); < } < while (ourcoords.indexOf("]") != -1) { < ourcoords=ourcoords.replace("]", " "); < csvcoords=csvcoords.replace("]", ""); < } < while (ourcoords.indexOf("[") != -1) { < ourcoords=ourcoords.replace("[", ""); < csvcoords=csvcoords.replace("[", ""); < //alert(csvcoords); < } < var newcoords=csvcoords.split(","); < < if (incoords.indexOf("-") != -1 || 1 == 1) { < ourcoords = ""; < //alert(newcoords.length + ":" + incoords + "?" + csvcoords); < inx = newcoords[0]; < iny = newcoords[1]; < for (var ijk=0; ijk eval(maxy)) maxy = parseFloat(newcoords[jijk]); < } else if (eval(newcoords[jijk]) > eval(maxx)) { < maxx = parseFloat(newcoords[jijk]); < } < } < var opop = window.open("", "Polygon " + numlegs, "left=20,top=20,height=" + parseFloat(50 + maxy) + ",width=" + parseFloat(10 + maxx)); < var myhtml = "Polygon " + numlegs + "

Perimeter: " + (initiallength * numlegs) + "  Area: " + area + "


Sorry, your browser does not support inline SVG."; < opop.document.write(myhtml); < return incoords; < } < < function adjclick() { < document.getElementById("adjust").click(); < } < < function fillInSome() { < var theangle = eval(360.0 / numlegs); < if (document.body.innerHTML.indexOf("ichar" + "t_div") == -1) { < document.body.innerHTML += '
'; < } < for (var ij=0; ij processTraverse(params['traverse']); 269c178 < numlegs = prompt("Please tell me how many Shape/Traverse equal sides/legs you have (optionally add a side length (comma separated))", "4,300"); --- > numlegs = prompt("Please tell me how many Traverse legs you have", "0"); 271,275c180 < if (numlegs.indexOf(",") != -1) { < window.location = window.location + "?sides=" + numlegs.replace(",", ",0&length="); < } else { < window.location = window.location + "?sides=" + numlegs + ",0"; < } --- > window.location = window.location + "?traverse=" + numlegs + ",0"; 299c204 < //zicd.src = "./ShapeDraw.php?coords=" + ibit; --- > //zicd.src = "./SurveyTraverse.php?coords=" + ibit; 405c310 < icd.src = "./ShapeDraw.php?coords=" + svgit(ibit); --- > icd.src = "./SurveyTraverse.php?coords=" + ibit; 512c417 < xicd.src = "./ShapeDraw.php?coords=" + svgit(ibit); --- > xicd.src = "./SurveyTraverse.php?coords=" + ibit; 636c541 < document.write("

Shape Draw Calculation

 Restart


"); --- > document.write("

Survey Traverse Calculation

 Restart


"); 660c565 < $htm .= '
' . "\n"; --- > $htm .= '
' . "\n"; 662c567 < $posthtm .= '
' . "\n"; --- > $posthtm .= '
' . "\n"; 665c570 < echo '
' . "\n"; --- > echo '
' . "\n"; 667,668c572,573 < echo '
' . "\n"; < echo '
' . "\n"; --- > echo ' ' . "\n"; > echo ' ' . "\n";