(method)
| 128 | } |
| 129 | |
| 130 | setLoadMethod(method) { |
| 131 | if (method === 'datastore') { |
| 132 | this.osrmLoader = new OSRMDatastoreLoader(this); |
| 133 | } else if (method === 'directly') { |
| 134 | this.osrmLoader = new OSRMDirectLoader(this); |
| 135 | } else if (method === 'mmap') { |
| 136 | this.osrmLoader = new OSRMmmapLoader(this); |
| 137 | } else { |
| 138 | this.osrmLoader = null; |
| 139 | throw new Error(`No such data load method: ${method}`); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | getProfilePath(profile) { |
| 144 | return path.join(wp.profilesPath, `${profile}.lua`); |