ใน 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
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe Maps SDK for Android Utility Library is an open-source library offering advanced features for enhancing Google Maps in Android applications.\u003c/p\u003e\n"],["\u003cp\u003eIt provides utilities for importing GeoJSON and KML data, adding heatmaps, clustering markers, managing multiple map layers, and working with polylines.\u003c/p\u003e\n"],["\u003cp\u003eThe library includes features for customizing markers with bubble icons and performing spherical geometry calculations for distances, areas, and headings.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can quickly set up the library by following the provided setup guide and access detailed documentation for each utility.\u003c/p\u003e\n"],["\u003cp\u003eA demo app is included in the GitHub repository showcasing the usage of the various classes and functionalities within the library.\u003c/p\u003e\n"]]],["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"],null,[]]