1
0
Fork 0
mirror of https://github.com/Luzifer/gpxhydrant.git synced 2024-12-22 12:11:17 +00:00

Fix: Add a bit more space around bbox

This is required if for example only one hydrant is queried
This commit is contained in:
Knut Ahlers 2016-05-07 14:14:48 +02:00
parent cba51a2052
commit ae02981234
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -239,7 +239,8 @@ func main() {
}
}
mapData, err := osmClient.RetrieveMapObjects(minLon, minLat, maxLon, maxLat)
border := 0.00009 // Equals ~10m using haversine formula
mapData, err := osmClient.RetrieveMapObjects(minLon-border, minLat-border, maxLon+border, maxLat+border)
if err != nil {
log.Fatalf("Unable to get map data: %s", err)
}