Package google.geo.type
אזור התצוגה
אזור תצוגה של קווי אורך ורוחב, מיוצג כשני נקודות נגדיות באלכסון 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 } }
שדות |
low |
LatLng
חובה. הנקודה הנמוכה של אזור התצוגה.
|
high |
LatLng
חובה. הנקודה הגבוהה של אזור התצוגה.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-07-02 (שעון UTC).
[null,null,["עדכון אחרון: 2024-07-02 (שעון UTC)."],[[["A Viewport is defined by two points, `low` and `high`, representing the southwest and northeast corners of a rectangular area on a map."],["It's crucial that `low` latitude is less than `high` latitude and, generally, `low` longitude is less than `high` longitude for the viewport to be valid."],["The viewport encompasses all points within its boundaries, including the boundary lines themselves."],["Special cases exist where longitude ranges can be inverted or represent the entire globe, but latitude ranges must be logically ordered."],["Both `low` and `high` points are mandatory, and the resulting viewport cannot be empty, otherwise, an error will occur."]]],["A Viewport, defined by `low` and `high` latitude-longitude points, represents a closed region. Both `low` and `high` points are mandatory. Longitude ranges can be inverted, crossing the 180-degree line, or encompass all longitudes. Latitude ranges, if `low` is greater than `high` are empty. A viewport can be a single point when `low` equals `high`. An empty viewport, when both are equal, results in an error.\n"]]