Add combined lat lng field to ev chargers response (#222)

This commit is contained in:
Dominic Wong
2021-10-04 16:27:00 +01:00
committed by GitHub
parent 19582c661f
commit f23a935a9a
7 changed files with 202 additions and 188 deletions

View File

@@ -2,6 +2,7 @@ package handler
import (
"context"
"fmt"
"io/ioutil"
"os"
"strconv"
@@ -211,6 +212,7 @@ func (e *Evchargers) Search(ctx context.Context, request *evchargers.SearchReque
AccessComments: result.Address.AccessComments,
Postcode: result.Address.Postcode,
CountryId: strconv.Itoa(int(result.Address.CountryID)),
LatLng: fmt.Sprintf("%v, %v", result.Address.Latitude, result.Address.Longitude),
},
Connections: marshalConnections(result.Connections),
NumPoints: int64(result.NumberOfPoints),