Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mesh
meshmap
Commits
25875f6b
Commit
25875f6b
authored
Mar 28, 2018
by
Eric - kg6wxc
Browse files
still not right...
parent
5b4451af
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/map_functions.inc
View file @
25875f6b
...
...
@@ -315,6 +315,7 @@ function load_LinkList($NodeList, $TopoList)
function
load_LinkedTO
(
$node_info
,
$TopoList
)
{
$linkedToList
=
""
;
//$linkInfoForStationPopups = array($node_info['node'] => array());
$linkInfoForStationPopups
=
array
(
$node_info
[
'node'
]
=>
""
);
$node
=
$node_info
[
'node'
];
//and build a big 3D array of it all
...
...
@@ -338,27 +339,25 @@ function load_LinkedTO($node_info, $TopoList)
if
(
$value
[
'nodelat'
]
&&
$value
[
'linklon'
])
{
//this is the section that is exploding in php7
///
///
///
///
////5
/////6
//////7
///////8
//this is the section that is exploding in php7.2.3
if
(
$value
[
'linkto'
]
==
$node
)
{
//echo var_dump($node_info['node']);
$linkedNode
=
array
(
$value
[
'node'
]);
$linkedNodesKeyNameArray
=
array
(
"costFrom"
,
"costTo"
,
"distance"
,
"bearing"
);
$linkedNode
[
$value
[
'node'
]]
=
array_fill_keys
(
$linkedNodesKeyNameArray
,
""
);
$linkedNode
[
$value
[
'node'
]][
'costFrom'
]
=
$value
[
'cost'
];
$linkInfoForStationPopups
[
$node_info
[
'node'
]][]
=
$linkedNode
;
//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
//$linkInfoForStationPopups[$node_info['node']][$value['node']]["costFrom"] = $value['cost'];
//echo var_dump($node_info['node']);
//$linkedNode = array($value['node']);
//$linkedNodesKeyNameArray = array("costFrom", "costTo", "distance", "bearing");
//$linkedNode[$value['node']] = array_fill_keys($linkedNodesKeyNameArray, "");
//$linkedNode[$value['node']]['costFrom'] = $value['cost'];
$linkInfoForStationPopups
[
$node_info
[
'node'
]]
=
array
(
$value
[
'linkto'
]
=>
array
(
'costFrom'
=>
$value
[
'cost'
],
'costTo'
=>
""
,
'distance'
=>
""
,
'bearing'
=>
""
));
// $linkInfoForStationPopups[$node_info['node']] = $linkedNode;
//$linkInfoForStationPopups[$node_info['node']][$value['node']] = array_fill_keys($linkedNodesKeyNameArray, $value['cost']);
unset
(
$linkedNodesKeyNameArray
);
//
unset($linkedNodesKeyNameArray);
//$linkInfoForStationPopups[$node_info['node']] = array($value['node'] => "");
}
if
(
$value
[
'node'
]
==
$node
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment