Commit b3b917d0 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

just a little cleaning up of my commented lines in map_functions

parent b03aea08
......@@ -316,8 +316,12 @@ function load_LinkedTO($node_info, $TopoList)
{
$linkedToList = "";
$linkInfoForStationPopups = array($node_info['node'] => array());
//don't init what is going to be an array as a string!!
//$linkInfoForStationPopups = array($node_info['node'] => "");
$node = $node_info['node'];
//and build a big 3D array of it all
//like this:
//array
......@@ -331,6 +335,7 @@ function load_LinkedTO($node_info, $TopoList)
// "CostFrom"
// "CostTo"
//etc..etc..
if (isset($TopoList))
{
foreach ($TopoList as $value)
......@@ -343,19 +348,13 @@ function load_LinkedTO($node_info, $TopoList)
if ($value['linkto'] == $node)
{
//original lines (leave for now)
//this will be the cost FROM each linked station back TO the node we are currently looking at in the while loop
//original line (leave for now)
//$linkInfoForStationPopups[$node_info['node']][$value['node']]["costFrom"] = $value['cost'];
//the new line(s)
// $linkedNodeArray = array($value['node']);
// $linkInfoForStationPopups[$node_info['node']][$linkedNodeArray] = array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => "");
// $linkInfoForStationPopups[$node_info['node']][] = array($value['node'] => array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => ""));
$linkInfoForStationPopups[$node_info['node']][$value['node']] = array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => "");
//the new line
//had to create the array correctly! fixed 3-28-2018 - wxc
$linkInfoForStationPopups[$node_info['node']][$value['node']] = array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => "");
}
if ($value['node'] == $node)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment