Skip to content

Commit

Permalink
🐛 use x as long and y as lat for closest search
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Rahier committed Apr 30, 2023
1 parent 790841d commit f44fa30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (c *Controller) GetClosestGeoPoint(ctx *gin.Context) {
return
}

target := postgis.PointS{X: closestTo.Latitude, Y: closestTo.Longitude, SRID: geopoint.WGS84}
target := postgis.PointS{X: closestTo.Longitude, Y: closestTo.Latitude, SRID: geopoint.WGS84}
if closestTo.SRID != nil {
target.SRID = *closestTo.SRID
}
Expand Down

0 comments on commit f44fa30

Please sign in to comment.