Skip to content

dijkstraPath weight  #76

Description

@cath222ou

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions