fkling / fkling/JSNetworkX

dijkstraPath weight

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
779
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Hello,
I tried to use dijkstraPath with a weight.
However, when I set an edge attribute as weight, I get an error 'Can not read property' toString 'of undefined'.
How i can use an edge attribute for weight ?

var poidMan1 = parseInt(featureToUpdate.getProperties().ifmanuel);
G.addNodesFrom(geometry);
G.addEdge(
start, end,
{
poidMan: poidMan1,
}
);
path = jsnx.dijkstraPath(G, {source:depart, target:arrivee, weight:poidMan });

Thanks for your help.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.