make distance stuff greate again
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"git.coopgo.io/coopgo-platform/carpool-service/storage"
|
||||
"github.com/paulmach/orb"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -24,6 +25,13 @@ func NewTilesHandler(cfg *viper.Viper, persistantStorage storage.Storage) (*Tile
|
||||
|
||||
// GetTiles retrieves tiles
|
||||
func (h *TilesHandler) GetTiles(driverOrPassenger string, date time.Time, points ...orb.Point) (*Tileset, error) {
|
||||
dateString := date.Format("2006-01-02")
|
||||
|
||||
log.Debug().
|
||||
Any("points", points).
|
||||
Str("date", dateString).
|
||||
Msg("Get Tiles")
|
||||
|
||||
result := Tileset{}
|
||||
|
||||
grid_ids := []GridId{}
|
||||
@@ -36,7 +44,6 @@ func (h *TilesHandler) GetTiles(driverOrPassenger string, date time.Time, points
|
||||
grid_ids = []GridId{PointGridId(points[0])}
|
||||
}
|
||||
|
||||
dateString := date.Format("2006-01-02")
|
||||
for _, gid := range grid_ids {
|
||||
tile, err := h.GetTile(driverOrPassenger, date, gid)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user