perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
301 stars 87 forks source link

Second Issue #4

Closed SteveFirsake closed 8 years ago

SteveFirsake commented 8 years ago

Hello, I learned to use Node.js and npm efficiently now. I have the following comments and observations about your repository:

  1. I noticed that this link does NOT use geojson-path-finder library, it uses leaflet-routing-machine. Why did you use it as an example?
  2. I cannot find any geojson-path-finder example anywhere online. Can you zip up one simple example for me - like the example you provide
  3. path = pathFinder.findPath(start, finish); //this was the most confusing section. please give a sample geojson line for start and finish. I tried a couple of geojson point scripts e.g.
var finish = { "type": "Point",
                     "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },      "features": [ "geometry":{ "type": "Point", "coordinates": [36.97194311, -1.455614833] } ] }; 

var start = { "type": "Point", 
                    "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ "geometry":{ "type": "Point", "coordinates": [36.9775,-1.4508] }] }; 

but these did not work. Please try the solution first

Regards,

Steve

perliedman commented 8 years ago

http://www.liedman.net/geojson-path-finder/ does indeed use GeoJSON Path Finder. Note that GeoJSON path finder is just the path finding bit - I also use Leaflet Routing Machine for the user interface. LRM is a user interface for routing, and does no path finding in itself, GeoJSON Path Finder has no user interface, just path finding. Hence, they complement each other perfectly.

You can check the actual code it uses to verify this: https://github.com/perliedman/geojson-path-finder/blob/gh-pages/index.js

The "router", or the adapter between LRM and GeoJSON Path Finder, can be found here: https://github.com/perliedman/geojson-path-finder/blob/gh-pages/router.js

As far as I know, this is the only public example of GeoJSON Path Finder. I use it in some customer projects, but they are not public yet. Note that you can find all the example code in the module's gh-pages branch.

SteveFirsake commented 8 years ago

Thank you very much. I used the master library...had not seen the gh pages. please add the missing files to the main library.

Regards,

Steve

On Wed, Aug 17, 2016 at 2:13 PM, Per Liedman notifications@github.com wrote:

Closed #4 https://github.com/perliedman/geojson-path-finder/issues/4.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/perliedman/geojson-path-finder/issues/4#event-758340309, or mute the thread https://github.com/notifications/unsubscribe-auth/ASaFn0zpoJeqi7IV0f1chmlUuKZZjWftks5qguzcgaJpZM4JmTaT .