Viewport
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
대각선으로 반대되는 두 개의 low
및 high
지점으로 표시되는 위도-경도 표시 영역 표시 영역은 닫힌 영역으로 간주됩니다. 즉, 경계가 포함됩니다. 위도 경계는 -90도에서 90도 사이여야 하며 경도 경계는 -180도에서 180도 사이여야 합니다. 다양한 케이스는 다음과 같습니다.
low
= high
이면 표시 영역은 단일 지점으로 구성됩니다.
low.longitude
> high.longitude
인 경우 경도 범위가 반전됩니다 (표시 영역이 180도 경도 선을 교차함).
low.longitude
= -180도이고 high.longitude
= 180도인 경우 뷰포트에 모든 경도가 포함됩니다.
low.longitude
= 180도이고 high.longitude
= -180도인 경우 경도 범위가 비어 있습니다.
low.latitude
가 high.latitude
보다 크면 위도 범위가 비어 있습니다.
low
및 high
모두 채워야 하며, 위에 정의된 대로 표현된 상자는 비워 둘 수 없습니다. 뷰포트가 비어 있으면 오류가 발생합니다.
예를 들어 이 뷰포트는 뉴욕시를 완전히 포함합니다.
{ "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }
JSON 표현 |
{
"low": {
object (LatLng )
},
"high": {
object (LatLng )
}
} |
필드 |
low |
object (LatLng )
필수 항목입니다. 표시 영역의 하단입니다.
|
high |
object (LatLng )
필수 항목입니다. 표시 영역의 최고점입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 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. |"]]