Chế độ xem vĩ độ-kinh độ, được biểu thị dưới dạng hai điểm low và high đối diện nhau theo đường chéo. Khung nhìn được coi là một vùng kín, tức là bao gồm cả ranh giới. Giới hạn vĩ độ phải nằm trong khoảng từ -90 đến 90 độ, và giới hạn kinh độ phải nằm trong khoảng từ -180 đến 180 độ. Có nhiều trường hợp như sau:
Nếu low = high, khung nhìn sẽ bao gồm một điểm duy nhất đó.
Nếu low.longitude > high.longitude, thì dải kinh độ sẽ bị đảo ngược (khung nhìn sẽ cắt ngang đường kinh độ 180 độ).
Nếu low.longitude = -180 độ và high.longitude = 180 độ, thì khung nhìn sẽ bao gồm tất cả kinh độ.
Nếu low.longitude = 180 độ và high.longitude = -180 độ, thì phạm vi kinh độ sẽ trống.
Nếu low.latitude > high.latitude, thì phạm vi vĩ độ sẽ trống.
Bạn phải điền cả low và high, đồng thời hộp được biểu thị không được để trống (như đã chỉ định trong các định nghĩa ở trên). Chế độ xem trống sẽ dẫn đến lỗi.
Ví dụ: khung nhìn này bao gồm toàn bộ thành phố New York:
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[],[],null,["# Viewport\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nA latitude-longitude viewport, represented as two diagonally opposite `low` and `high` points. A viewport is considered a closed region, i.e. it includes its boundary. The latitude bounds must range between -90 to 90 degrees inclusive, and the longitude bounds must range between -180 to 180 degrees inclusive. Various cases include:\n\n- If `low` = `high`, the viewport consists of that single point.\n\n- If `low.longitude` \\\u003e `high.longitude`, the longitude range is inverted (the viewport crosses the 180 degree longitude line).\n\n- If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport includes all longitudes.\n\n- If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, the longitude range is empty.\n\n- If `low.latitude` \\\u003e `high.latitude`, the latitude range is empty.\n\nBoth `low` and `high` must be populated, and the represented box cannot be empty (as specified by the definitions above). An empty viewport will result in an error.\n\nFor example, this viewport fully encloses New York City:\n\n{ \"low\": { \"latitude\": 40.477398, \"longitude\": -74.259087 }, \"high\": { \"latitude\": 40.91618, \"longitude\": -73.70018 } }\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"low\": { object (/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng) }, \"high\": { object (/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng) } } ``` |\n\n| Fields ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `low` | `object (`[LatLng](/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng)`)` Required. The low point of the viewport. |\n| `high` | `object (`[LatLng](/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng)`)` Required. The high point of the viewport. |"]]