2020-05-08 15:41:01 +02:00
|
|
|
package query
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// GeoResult represents a photo for displaying it on a map.
|
|
|
|
type GeoResult struct {
|
|
|
|
ID string `json:"ID"`
|
|
|
|
PhotoLat float32 `json:"Lat"`
|
|
|
|
PhotoLng float32 `json:"Lng"`
|
|
|
|
PhotoUUID string `json:"PhotoUUID"`
|
|
|
|
PhotoTitle string `json:"PhotoTitle"`
|
|
|
|
PhotoFavorite bool `json:"PhotoFavorite"`
|
|
|
|
FileHash string `json:"FileHash"`
|
|
|
|
FileWidth int `json:"FileWidth"`
|
|
|
|
FileHeight int `json:"FileHeight"`
|
|
|
|
TakenAt time.Time `json:"TakenAt"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g GeoResult) Lat() float64 {
|
|
|
|
return float64(g.PhotoLat)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g GeoResult) Lng() float64 {
|
|
|
|
return float64(g.PhotoLng)
|
|
|
|
}
|
2020-05-11 14:49:00 +02:00
|
|
|
|
|
|
|
type GeoResults []GeoResult
|