Earth Engine,
गैर-व्यावसायिक इस्तेमाल के लिए कोटा टियर लॉन्च कर रहा है. इससे शेयर किए गए कंप्यूट संसाधनों को सुरक्षित रखने और सभी के लिए भरोसेमंद परफ़ॉर्मेंस को पक्का करने में मदद मिलेगी. सभी गैर-व्यावसायिक प्रोजेक्ट को
27 अप्रैल, 2026 तक कोटा टियर चुनना होगा. ऐसा न करने पर, वे डिफ़ॉल्ट रूप से कम्यूनिटी टियर का इस्तेमाल करेंगे. टियर के कोटे, सभी प्रोजेक्ट के लिए
27 अप्रैल, 2026 से लागू होंगे. भले ही, टियर चुनने की तारीख कुछ भी हो.
ज़्यादा जानें।
Map.getCenter
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, मैप के बीच में मौजूद जगह के अक्षांश और देशांतर के निर्देशांक दिखाता है.
| इस्तेमाल | रिटर्न |
|---|
Map.getCenter() | Geometry.Point |
कोई आर्ग्युमेंट नहीं.
उदाहरण
कोड एडिटर (JavaScript)
// The default map in the Code Editor is a built-in ui.Map object called "Map".
// Let's refer to it as "defaultMap" for clarity.
var defaultMap = Map;
// ui.Map objects can be constructed. Here, a new map is declared.
var newMap = ui.Map({
center: {lat: 0, lon: 0, zoom: 1},
style: {position: 'bottom-right', width: '400px'}
});
// Add the newMap to the defaultMap.
defaultMap.add(newMap);
// You can set the viewport of a ui.Map to be centered on an object.
// Here, the defaultMap is centered on a point with a selected zoom level.
var geom = ee.Geometry.Point(-122.0841, 37.4223);
defaultMap.centerObject(geom, 18);
defaultMap.addLayer(geom, {color: 'orange'}, 'Googleplex');
// Map extent can be fetched using the ui.Map.getBounds method.
print('defaultMap bounds as a list',
defaultMap.getBounds());
print('defaultMap bounds as a dictionary',
ee.Dictionary.fromLists(['w', 's', 'e', 'n'], defaultMap.getBounds()));
print('defaultMap bounds as GeoJSON',
defaultMap.getBounds({asGeoJSON: true}));
// Map center point can be fetched using the ui.Map.getCenter method.
print('defaultMap center as a Point geometry', defaultMap.getCenter());
// Map zoom level can be fetched using the ui.Map.getZoom method.
print('defaultMap zoom level', defaultMap.getZoom());
// Map scale can be fetched using the ui.Map.getScale method.
print('defaultMap approximate pixel scale', defaultMap.getScale());
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],["The `Map.getCenter()` method retrieves the map's center coordinates as a `Geometry.Point`. `Map.getBounds()` fetches map extent, returning a list, dictionary, or GeoJSON. `Map.getZoom()` and `Map.getScale()` retrieve the map's zoom level and approximate pixel scale, respectively. The examples demonstrate creating new maps, centering them on objects using `centerObject()`, and adding layers. The code uses methods to access different properties from the map object.\n"]]