question

Alyson P avatar image
0 Likes"
Alyson P asked Ryan Clark commented

Get distance between two points in GIS

Hello guys,

I created a map in Flexsim that has some cities, each city is represented by a Point.

Now I need, through Flexscript, to get the Driving Roads distance between two of these cities or to get a Route object so that I can access its properties. Is there any way I can do it in the source code or this distance is only showed in Route Properties?


Thanks for your attention.

FlexSim 21.2.4
gisdistancedistancetotravelroutepoints
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Alyson P commented
  1. treenode point1 = Model.find("GISNavigator/Point1");
  2. treenode point2 = Model.find("GISNavigator/Point2");
  3. double distance = function_s(point1, "getDistance", point2);

Task executer's path record within a map (GIS) - FlexSim Community

· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Miguel_ngel Ra avatar image
1 Like"
Miguel_ngel Ra answered Ryan Clark commented

Hello Alyson i have the same problem, could you paste here all your code to get the full distance matrix please

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.