ใน Google Maps พิกัดละติจูดและลองจิจูดที่กําหนดเส้นประกอบหรือรูปหลายเหลี่ยมจะจัดเก็บเป็นสตริงที่เข้ารหัส ดูคำอธิบายโดยละเอียดเกี่ยวกับการเข้ารหัส Polyline คุณอาจได้รับสตริงที่เข้ารหัสนี้ในการตอบกลับจาก Google API เช่น Directions API (เดิม)
คุณสามารถใช้ PolyUtil ในไลบรารียูทิลิตี Maps SDK สําหรับ Android เพื่อเข้ารหัสลําดับพิกัดละติจูด/ลองจิจูด ("LatLngs") เป็นสตริงเส้นทางที่เข้ารหัส และเพื่อถอดรหัสสตริงเส้นทางที่เข้ารหัสเป็นลําดับ LatLngs ซึ่งจะช่วยให้มั่นใจได้ว่าเว็บเซอร์วิสของ Google Maps API จะทำงานร่วมกันได้
คลาส StreetViewUtil มีฟังก์ชันการทำงานเพื่อตรวจสอบว่า Street View รองรับสถานที่หรือไม่ คุณหลีกเลี่ยงข้อผิดพลาดเมื่อเพิ่มภาพพาโนรามาของ Street View ลงในแอป Android ได้โดยเรียกใช้ยูทิลิตีข้อมูลเมตานี้ และเพิ่มภาพพาโนรามาของ Street View เฉพาะในกรณีที่การตอบกลับคือ OK
[[["เข้าใจง่าย","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-09-25 UTC"],[],["The Maps SDK for Android Utility Library offers tools for enhancing map functionality. Key actions include importing GeoJSON and KML data, adding heatmaps, managing marker clusters, and customizing markers with bubble icons. It supports adding multiple layers, and it also allows users to encode/decode polylines and utilize spherical geometry for distance, area, and heading calculations. Additionally, users can check if a location is supported in street view. All utilities are open-source, and can be viewed with the provided demo app.\n"]]