osrm-isochrone
osrm-isochrone copied to clipboard
You should update your instructions for usage!
The path to the files:
/node_modules/osrm-isochrone/osrm/lib/binding/osrm-extract
/node_modules/osrm-isochrone/osrm/lib/binding/osrm-prepare
are wrong and do not exist. I found similar files in:
/node_modules/osrm/lib/binding
but i cant find the osrm-prepare
file!
I have a osrm file (and many other files from the OSRM Project. I changed the Path to the OSRM File in your Demofile. When i try to run the demo file i get Errors:
/home/user/node_modules/@turf/isolines/conrec.js:380
temp1 = Math.min(d[i][j], d[i][j + 1]);
^
TypeError: Cannot read property '24' of undefined
at Conrec.contour (/home/user/node_modules/@turf/isolines/conrec.js:380:36)
at module.exports (/home/user/node_modules/@turf/isolines/index.js:80:7)
at draw (/home/user/node_modules/osrm-isochrone/index.js:20:20)
at /home/user/node_modules/osrm-isochrone/index.js:74:31```
-
osrm-prepare
was changed toosrm-contract
- as for
property '24'
error, make sure yourlocation
variable in your index.js is inside your osrm network. Perhaps you've mixed up long/lat or just forgot to change it to your own coordinates
Seems the documentation is terrible. I can't seem to find a description explaining what resolution should be or what units it's expressed as. Sigh
as for property '24' error, make sure your location variable in your index.js is inside your osrm network. Perhaps you've mixed up long/lat or just forgot to change it to your own coordinates
Indeed.
It looks like
self.draw(destinations);
will produce that error if there are no 'destinations', i.e. outputs from the GeoJSON, which happens if the line
var location = [-77.02926635742188,38.90011780426885];
is not changed to your own lng,lat pair representing a location within the network area of your data.
I can't seem to find a description explaining what resolution should be or what units it's expressed as.
The value is passed to the turf-isolines
module here:
https://github.com/Turfjs/turf/blob/v3.5.2/packages/turf-isolines/index.js#L20
where the parameter is defined as:
"Resolution of the underlying grid"
Perhaps the example there will be of help.