Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Khi đặt các thuộc tính điểm đánh dấu nâng cao cụ thể, bạn có thể theo dõi các sự kiện điểm đánh dấu như thao tác nhấn và cử chỉ.
Nếu nhấn vào một điểm đánh dấu, người dùng có thể xem thêm thông tin như tiêu đề hoặc đoạn trích của điểm đánh dấu. Bạn cũng có thể di chuyển các điểm đánh dấu có thể kéo bằng cử chỉ nhấn và giữ.
Để tạo một điểm đánh dấu có thể kéo, hãy đặt thuộc tính GMSMarker.draggable.
Để đặt văn bản mô tả cho một điểm đánh dấu, hãy sử dụng thuộc tính GMSMarker.title.
Phản hồi các sự kiện đánh dấu
Bạn có thể phản hồi sự kiện đánh dấu bằng cách thêm giao thức GMSMapViewDelegate vào khung hiển thị và triển khai lệnh gọi lại tương ứng. Ví dụ này xác định title và snippet cho một điểm đánh dấu đã chọn.
Khi bật thuộc tính draggable, người dùng có thể kéo điểm đánh dấu trên bản đồ bằng cử chỉ nhấn và giữ. Để tạo một điểm đánh dấu có thể kéo, hãy đặt thuộc tính GMSMarker.draggable thành true.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-10 UTC."],[[["\u003cp\u003eGoogle Maps SDK for iOS allows you to monitor marker events like taps and gestures, displaying information like title and snippet when tapped.\u003c/p\u003e\n"],["\u003cp\u003eYou can enable marker dragging using a long press gesture by setting the \u003ccode\u003eGMSMarker.draggable\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eMarker visibility can be controlled based on the map's zoom level using the \u003ccode\u003eGMSMapViewDelegate\u003c/code\u003e and setting the \u003ccode\u003eGMSMarker.map\u003c/code\u003e property conditionally.\u003c/p\u003e\n"],["\u003cp\u003eTo respond to marker events and access details like title and snippet, implement the \u003ccode\u003eGMSMapViewDelegate\u003c/code\u003e protocol and its corresponding callback methods.\u003c/p\u003e\n"]]],["Markers' events, like taps and gestures, can be monitored by adding `GMSMapViewDelegate`. Tapped markers reveal their title and snippet, set using `GMSMarker.title`. Markers can be made draggable with `GMSMarker.draggable`, allowing movement via long press. You can control marker visibility based on zoom level by setting `GMSMarker.map` within the `GMSMapViewDelegate` callback. Implementing the delegate protocol also allows for handling custom responses to specific marker interactions.\n"],null,[]]