簡體   English   中英

Google Maps Directions API-路線未繪制超過8個航路點

[英]Google Maps Directions API - Route not getting plotted for more than 8 waypoints

我正在嘗試使用Google Maps Directions API在我的項目中繪制路線,但不適用於超過8個的航路點。

    var request = {
        origin: start,
        destination: end,
        waypoints: waypts,
        optimizeWaypoints: true,
        travelMode: google.maps.TravelMode.DRIVING,
        key: "our-api-key"
    }

https://developers.google.com/maps/documentation/directions/usage-limits

如使用限制頁面所述,我們在請求中傳遞了API密鑰,並且還為我們的帳戶啟用了結算功能。 但它僅適用於少於8個航路點的路線。 我可能做錯了什么?

根據Google在本期中的介紹,免費用戶將23個航點“擴展”到23個航點僅適用於Directions API(網絡服務) ,而不適用於Google Maps Javascript API v3 DirectionsService

  • Web服務(Directions API,Distance Matrix API)免費用戶(API密鑰)和Maps for Work用戶(客戶端ID +簽名)都有23個航路點
  • JavaScript API(方向服務,距離矩陣服務):免費用戶(API密鑰)有8個航點,Maps for Work用戶(客戶端ID)有23個航點。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM