geojson#LineString TypeScript Examples
The following examples show how to use
geojson#LineString.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Api.ts From graphhopper-maps with Apache License 2.0 | 5 votes |
private static decodePoints(path: RawPath, is3D: boolean) {
if (path.points_encoded)
return {
type: 'LineString',
coordinates: ApiImpl.decodePath(path.points as string, is3D),
}
else return path.points as LineString
}
Example #2
Source File: Api.ts From graphhopper-maps with Apache License 2.0 | 5 votes |
private static decodeWaypoints(path: RawPath, is3D: boolean) {
if (path.points_encoded)
return {
type: 'LineString',
coordinates: ApiImpl.decodePath(path.snapped_waypoints as string, is3D),
}
else return path.snapped_waypoints as LineString
}