รวมไลบรารี
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รวม คือ
ของการจัดการเหตุการณ์ที่ไม่พร้อมกันโดยการรวมตัวดำเนินการประมวลผลเหตุการณ์
การรวมจะทำให้โค้ดอ่านและดูแลได้ง่ายขึ้นด้วยการรวมโค้ดการประมวลผลเหตุการณ์ไว้ในที่เดียว
ไลบรารี GoogleMapsPlatformMerge
คือไลบรารี Swift ที่ส่งคืน
Publishers
แผนที่ SDK สำหรับ iOS และ Places SDK สำหรับ iOS คุณจะได้ประโยชน์
ของชุดคุณลักษณะ "รวม"
การติดตั้ง
ดู
ไลบรารี GoogleMapsPlatformMerge
ใน GitHub สำหรับข้อกำหนดของระบบล่าสุดและคำแนะนำในการติดตั้ง
ตัวอย่างการใช้งาน
ไลบรารี GoogleMapsPlatformMerge ประกอบด้วย
ชั้นเรียน GMSMapViewPublisher
ซึ่งมีพร็อพเพอร์ตี้ผู้เผยแพร่ที่ให้คุณสมัครรับข้อมูลเหตุการณ์ที่เกิดจากแผนที่ได้
ตัวอย่างต่อไปนี้กำหนดค่าอินสแตนซ์ GMSMapViewPublisher
เพื่อสมัครใช้บริการ
เหตุการณ์การเปลี่ยนแปลงของกล้อง
let publisher = GMSMapViewPublisher(mapView: mapView)
publisher.didChangeCameraPosition.sink { cameraPosition in
print("Camera position at \(cameraPosition.target)")
}
ขั้นตอนถัดไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-12 UTC
[null,null,["อัปเดตล่าสุด 2025-09-12 UTC"],[],["The content introduces the GoogleMapsPlatformCombine library, which utilizes Apple's Combine framework for handling asynchronous events within the Google Maps and Places SDKs for iOS. It leverages `Publishers` to manage events. A key action is demonstrated through the `GMSMapViewPublisher` class, allowing users to subscribe to map events. An example illustrates how to monitor camera position changes using the `didChangeCameraPosition` publisher. Installation instructions and further details are available on the library's GitHub page.\n"],null,[]]