Bắt đầu
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trước khi có thể sử dụng các phương thức API ưu tiên của tuyến trong mã, bạn phải bật các phương thức đó.
Cách bật các phương thức API ưu tiên của tuyến đường cho dự án:
Đăng nhập vào Cloud Console rồi chọn thẻ lựa chọn dự án:

Trong cửa sổ Select from (Chọn trong), hãy chọn New Project (Dự án mới).

Chỉ định tên và vị trí cho dự án, sau đó chọn Tạo.

Liên hệ với đại diện Google của bạn.
Nếu bạn chưa bật API ưu tiên cho tuyến đường cho dự án, hãy chuyển đến Thư viện API và dịch vụ trong Google Cloud Console.
Bạn có thể bỏ qua bước này nếu đã bật chế độ Ưu tiên tuyến đường.

Sau đó, hãy tìm Routes Preferred (Ưu tiên tuyến đường) để mở API Routes Preferred.

Để bật API, hãy chọn Bật.
Nếu bạn chưa có khoá API liên kết với dự án, hãy chuyển đến thẻ Thông tin xác thực. Bạn có thể bỏ qua bước này nếu đã có khoá API.

Chọn Tạo thông tin xác thực, rồi chọn Khoá API.

Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-04-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-04-24 UTC."],[[["\u003cp\u003eTo utilize Routes Preferred API, you must first enable it for your project through the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the API involves creating a new project, contacting your Google representative, and enabling the Routes Preferred API in the API library.\u003c/p\u003e\n"],["\u003cp\u003eMake sure to check and adjust your quota limits as needed and create an API key for your project to use the Routes Preferred API.\u003c/p\u003e\n"]]],[],null,["# Getting Started\n\nBefore you can use Routes Preferred API methods in your\ncode, you must enable them.\n\nTo enable Routes Preferred API methods with your project:\n\n1. Log in to [Cloud console](https://console.cloud.google.com)\n and select the project selection tab:\n\n2. In the **Select from** window, select **New Project**.\n\n3. Specify a name and location for the project, and then select **Create**.\n\n4. Contact your Google representative.\n\n5. If you don't already have the Routes Preferred API enabled for\n your project, navigate to the APIs \\& Services Library in Google Cloud console.\n You can skip this step if Routes Preferred is already enabled.\n\n Then search for *Routes Preferred* to open the Routes Preferred API.\n\n To enable the API, select **Enable**.\n | **Important:** Check your quota limits for Routes Preferred API methods. If you need to increase your quota limits, contact support by filing a case on the [Google Maps Platform support page](https://console.cloud.google.com/google/maps-apis/support) in the Google Cloud Console, or by calling the [Google Cloud Support Hotline](/maps/documentation/routes_preferred/support#support_hotline).\n6. If you don't already have an API key associated with your project,\n navigate to the Credentials tab. You can skip this step if you already\n have an API key.\n\n Select **Create Credentials** , and then **API Key**."]]