סקירה כללית על Elevation API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Layerion API הוא שירות שמחזיר נתוני גובה עבור
מיקום בכדור הארץ, או דגימות נתוני גובה לאורך נתיבים.
למה להשתמש ב-liftion API
באמצעות שכבה API, ניתן לפתח אפליקציות שתומכות
לקוחות עם פעילויות רגישות לגובה, אפליקציות מיצוב או סקרים נמוכים
אפליקציות שכוללות שינויי גובה וגובה של מסלולים. לדוגמה,
ניתן לספק נתונים לגבי עלייה ואובדן של עליות כדי לשפר אפליקציות ספורט עבור פעילויות כמו
כמו טיול רגלי, רכיבה על אופניים או צלילה.
מה אפשר לעשות עם Height API?
באמצעות ממשק ה-API של גובה הגבהים, ניתן לכלול נתוני גובה
או במפה. לדוגמה:
- בודקים את הגובה של מקום ספציפי.
- חשבו את ההבדלים בגובה לאורך מסלול או בין שני מסלולים
נקודות.
איך פועל Layerion API
ה-liftion API מקבל בקשה ככתובת URL מקודדת עם קואורדינטות של קו אורך/רוחב
צוין כמיקומים נפרדים או כסדרת מיקומים לאורך נתיב. הבקשה הזו,
לדוגמה, העלאת שאילתות למרכז דנבר, קולורדו, ציון החזרה בפורמט JSON.
https://maps.googleapis.com/maps/api/elevation/json
?locations=39.7391536%2C-104.9847034
&key=YOUR_API_KEY
השירות מפיק את הגובה של הקואורדינטות שסופקו. הוא גם מבצע אינטרפולציה
גובה של מיקום ללא גובה, שמספק ממוצע המוחזר מארבעת
המיקומים הקרובים ביותר שבהם מספקים נתוני גובה. לבסוף, היא קובעת
של המיקום.
משאבים
הטבלה הבאה מסכמת את המשאבים הזמינים באמצעות
ממשק API של liftion עם הנתונים שהוא מחזיר.
משאבי נתונים |
הנתונים שהוחזרו |
פורמט החזרה |
קואורדינטות של קו רוחב/קו אורך
אפשר לציין נתונים כקבוצה של מיקום אחד או יותר, או כסדרה לאורך נתיב. שלך
יכול גם לספק קואורדינטות מקודדות. מעבירים עד 512 קואורדינטות.
|
ממשק ה-API של גובה הגבהים מספק גובה במטרים ביחס
לרמת הים הממוצעת המקומית (LMSL). אפשר להחזיר גובה כחיובי
או ערכים שליליים כפי שמצוין בהמשך:
- ערכים חיוביים מציינים מיקומים מעל LMSL,
כולל מיקומים על פני השטח או תחתית של אגמים בגובה רב.
- ערכים שליליים מציינים מיקומים מתחת ל-LMSL, כולל
מיקומים על פני השטח או קרקעית האוקיינוס.
- רזולוציה: המרחק בין נקודת הנתונים
גובה במטרים.
|
|
איך להשתמש ב-liftion API
1 |
שנתחיל בהגדרה? |
מתחילים בהגדרת
פרויקט ב-Google Cloud
ולהשלים את ההגדרה
מפורטות שם. |
2 |
אפשר לנסות בקשת גובה |
לאחר שיהיה לך מפתח API, ניתן יהיה להתחיל לבדוק את Height API ישירות מ-
בדפדפן. ראו בקשות לדוגמה
לקבלת פרטים נוספים, אפשר לעיין במדריך תחילת העבודה.
|
3 |
כתיבת בקשה מורכבת יותר |
אחרי שהגדרתם פרויקט, נסו לשלוח בקשה שמספקת נתוני מיקום
נתיב. ראו ציון נתיבים
לקבלת פרטים.
|
4 |
מידע בסיסי על תשובות |
מומלץ לסקור את התגובות של נתוני הגובה כדי להתכונן לשימוש בנתוני גובה באפליקציה. צפייה
תגובות גובה
לקבלת פרטים.
|
5 |
שילוב נתוני גובה באפליקציה שלכם |
אפשר להשתמש בנתוני גובה כדי לשפר אפליקציות מבוססות-מיקום, כמו אפליקציות לספורט
פעילויות או נתוני סקרים.
|
ספריות לקוח זמינות
אפשר לקרוא ל-API הזה בשפה של
לבחירתכם באמצעות אחת מספריות הלקוח הבאות:
לקוחות Java, לקוח Python, לקוח Go ולקוח Node.js למפות Google
השירותים הם ספריות לקוח בתמיכה על ידי הקהילה, והן מבוססות על קוד פתוח
רישיון Apache 2.0.
מורידים אותם מ-GitHub, שם אפשר גם למצוא הוראות התקנה וקוד לדוגמה.
המאמרים הבאים
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eThe Elevation API provides elevation data for locations on Earth, enabling applications with elevation-sensitive features.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve elevation for single points or calculate elevation differences along paths, useful for activities like hiking or biking.\u003c/p\u003e\n"],["\u003cp\u003eThe API accepts latitude/longitude coordinates and returns elevation data in meters relative to local mean sea level, with resolution information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access the Elevation API through various client libraries (Java, Python, Go, Node.js) and integrate it into their applications.\u003c/p\u003e\n"],["\u003cp\u003eTo get started, set up a Google Cloud project, try sample requests, and explore the documentation for detailed usage instructions.\u003c/p\u003e\n"]]],[],null,["The Elevation API is a service that returns elevation data for\na location on the earth, or sampled elevation data along paths.\n\nWhy use the Elevation API\n\nWith the Elevation API, you can develop applications to support your\ncustomers with elevation-sensitive activities, positioning applications, or low-surveying\napplications that include elevations and elevation changes along routes. For example,\nyou can provide elevation gain and loss data to enhance a sports application for activities such\nas hiking, biking, or scuba diving.\n\nWhat you can do with the Elevation API\n\nWith the Elevation API, you can include elevation data in your\napplications or on a map. For example:\n\n- Get the **elevation** for a particular place.\n- Calculate the **differences** in elevation along a route or between two points.\n\nHow the Elevation API works The Elevation API accepts a request as an encoded URL with latitude/longitude coordinates provided as either discrete locations, or as a series of locations along a path. This request, for example, queries elevation for the center of Denver, Colorado, specifying a return in JSON format. \n\n```scdoc\n https://maps.googleapis.com/maps/api/elevation/json\n ?locations=39.7391536%2C-104.9847034\n &key=YOUR_API_KEY\n```\n\nThe service derives the elevation for the provided coordinates. It also interpolates\nelevation for a location without elevation, providing an average returned from the four\nnearest locations that do provide elevation data. Finally, it determines the overall\nresolution for the location.\n\nResources\n\nThe following table summarizes the resources available through the\nElevation API along with the data it returns.\n\n| Data resources | Data returned | Return format |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| **Latitude/longitude coordinates** You can provide data as a set of one or more locations, or as a series along a path. You can also provide encoded coordinates. Pass up to 512 coordinates. | The Elevation API provides **elevation in meters** relative to the **local mean sea level** (LMSL). Elevation can be returned as positive or negative values as indicated below: - **Positive values** indicate locations above LMSL, including surface locations or the bottom of high-altitude lakes. - **Negative values** indicate locations that are below LMSL, including locations on the surface or the ocean floor. - **Resolution** indicates the distance between the data point and the elevation, in meters. | - JSON - XML |\n\nHow to use the Elevation API\n\n|---|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up.** | Start with [Set up your Google Cloud project](/maps/documentation/elevation/cloud-setup) and complete the setup instructions that follow. |\n| 2 | **Try an elevation request** | Once you have an API key, you can start testing out the Elevation API directly from your browser. See [Sample requests](/maps/documentation/elevation/start#sample-request) in the *Getting started* guide for details. |\n| 3 | **Compose a more complex request** | Once you are set up with a project, try a request that supplies a location data along a path. See [Specifying paths](/maps/documentation/elevation/requests-elevation#Paths) for details. |\n| 4 | **Understand response basics** | Explore the elevation data responses to prepare to use elevation data for your app. See [Elevation responses](/maps/documentation/elevation/requests-elevation#ElevationResponses) for details. |\n| 5 | **Incorporate elevation data into your own app!** | You can use elevation data to enhance location-based apps, such as apps for sports activities or for survey data. |\n\nAvailable client libraries\n\nCall this API in the language of\nyour choice through one of the following client libraries:\n\n- [Java\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)\n- [Python\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)\n- [Go Client\n for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)\n- [Node.js\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)\n\nThe Java Client, Python Client, Go Client and Node.js Client for Google Maps\nServices are community-supported client libraries, open sourced under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\nDownload them from GitHub, where you can also find installation instructions and sample code.\n\nWhat's next\n\n- **Start using the Elevation API** : Go to [Set up your\n Google Cloud project](/maps/documentation/elevation/cloud-setup).\n- **Try getting path-based elevation data** : Go to [Specifying paths](/maps/documentation/elevation/requests-elevation#Paths)\n- **Follow best practices** : Go to [Web Service\n Best Practices](/maps/documentation/elevation/web-service-best-practices)."]]