How to implement path planning

I think your logic is correct. What I don’t know off-hand is on the third step, how pgRouting provides the results. It may not be a layer, but instead a polyline geometry that you add to your own layer. That’s what I have to do with Itinero.

While we’re talking, I have a question for you, regarding MFC. I was recently tasked with providing map support within an MFC application. After adding the OCX, and assigning it to a variable, I am able to make any calls into the Map control itself (internally, the _DMap Interface). However, when attempting to instantiate any other objects (e.g. Extents, or GlobalSettings), it works on the development machine, but always gets a Library Not Registered on a non-development machine. The map functions work, but the other classes don’t.

  1. I let MFC generate a Class based on the Type Library
  2. I create the object
  3. I call CreateDispatch on the object, passing in the progID (e.g. “MapWinGIS.GlobalSettings”)
  4. I can then make any calls while working on the development maching, but as soon as I put the executable on another machine, even though MapWinGIS is installed/registered, and I can interact with the map, any of the calls into the other classes raises an error. It is able to create the object, but all methods fail.

Something like the following:

CGlobalSettings* gs = new CGlobalSettings();
gs->CreateDispatch("MapWinGIS.GlobalSettings");
gs->put_ReprojectLayersOnAdding(TRUE);
gs->ReleaseDispatch();
delete gs;

The call to ReprojectLayersOnAdding is the line that errors out on the other machine. Any ideas? Have you been able to successfully interact with the non-Map classes?

Thanks for any input. And I’ll continue to be whatever help I can on the routing.

Regards.
Jerry.