reviewsהשקת Places UI Kit: ספריית רכיבים מוכנה לשימוש בעלות נמוכה, שמאפשרת לכם להוסיף לכל מפה שתבחרו את ממשק המשתמש המוכר של 'מקומות' במפות Google. כדאי לנסות אותו ולשלוח לנו משוב כדי לעזור לנו לעצב את העתיד של GMP.
constelevationService=google.maps.ElevationService();constlocations=[{lat:27.986065,lng:86.922623}];constcallback=(results,status)=>{if(status==='OK'){console.log(results);}else{// handle this case}};elevationService.getElevationForLocation({locations},callback);
בשלב הזה, יש תמיכה ב-Promises רק בשפות getPlacePredictions(). ↩
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-27 (שעון UTC)."],[[["\u003cp\u003eAsynchronous methods within the Google Maps JavaScript API predominantly return Promises for efficient handling of operations.\u003c/p\u003e\n"],["\u003cp\u003eNumerous Google Maps services, including Directions, Distance Matrix, Elevation, Geocoder, and Streetview, utilize Promises in their methods.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can employ async/await, then/catch/finally, or traditional callbacks to manage asynchronous operations and responses effectively.\u003c/p\u003e\n"],["\u003cp\u003eWhile Places generally do not utilize Promises, the \u003ccode\u003egetPlacePredictions()\u003c/code\u003e method within the Places AutocompleteService does offer partial Promise support.\u003c/p\u003e\n"],["\u003cp\u003eBeginning in 2020, all newly introduced APIs within the Google Maps JavaScript API exclusively support Promises for asynchronous operations.\u003c/p\u003e\n"]]],[],null,[]]