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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]