Add rudimentary HTTP server for RideWithGPS routes.
This commit is contained in:
parent
f879acf25d
commit
d1934a0e85
3 changed files with 96 additions and 8 deletions
|
@ -1,8 +1,8 @@
|
|||
package openname
|
||||
|
||||
import (
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -58,11 +58,7 @@ type TrackSummary struct {
|
|||
PointsOfInterest []POI
|
||||
}
|
||||
|
||||
func (gs *GPXSummarizer) SummarizeTrack(filename string) (*TrackSummary, error) {
|
||||
r, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
func (gs *GPXSummarizer) SummarizeTrack(r io.Reader) (*TrackSummary, error) {
|
||||
g, err := gpx.Read(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue