我需要使用Here技术从我的数据库优化地址列表。
我正在使用的JSON数据看起来像这样:替换了部分名称和id,以保证客户端的数据安全。
"kunde": [
{
"kundenId": ///,
"kundenbezeichnung": "Anger Ernestine",
"kundenNr": "K-///",
"tourHinweis": "",
"nachname": "Anger",
"vorname": "Ernestine",
"strasse": "Bergstraße 18",
"plz": "12169",
"ort": "Berlin",
"telefon1": "030 10449",
"telefon2": "",
"hatLieferAdresse": false,
"schluesselVorhanden": false,
"schluesselInfo": "",
"zahlungsart": "Überweisung",
"bruttoSumme": 1.0000,
"menge": 1,
"tourPos": 0,
"positionen": [
{
"kundenId": ///,
"belposId": ///,
"artikelId": ///,
"menge": 1,
"artikelbezeichnung": "Champigongsauce mit Serviettenknödel",
"artikelNr": "2302457",
"warengruppe": "Diät",
"bestellTypInfo": "Spalte 3",
"bruttopreis": 1.0000
}]},],
´´´
As already mentioned, I need to sort these Adresses to get the optimzed Route. Since my Client has more than 50 Customers per Tour, I cant use the Google Routing API, thats why I am using Here Technologies. The API works perfectly fine, but I don't have the GPS Koordinates stored in the Database. How can I use Here with normal String Adresses?
您可以使用我们的地理代码api。在geocode API中,您可以传递String地址来获取坐标。一旦你有了坐标,你就可以传入路由api来计算路由。
示例HERE geocode端点获取字符串地址的坐标。
https://geocode.search.hereapi.com/v1/geocode?q=jammu& apikey = your_api_key
更多地理编码产品的详细信息请参见以下产品文档。
https://developer.here.com/documentation/geocoding-search-api/dev_guide/index.html