با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
وقتی ویژگیهای نشانگر پیشرفته خاص تنظیم میشوند، میتوانید رویدادهای نشانگر مانند ضربهها و حرکات را کنترل کنید. اگر روی یک نشانگر ضربه بزنید، می توانید اطلاعات اضافی مانند عنوان نشانگر یا قطعه را مشاهده کنید. همچنین می توان نشانگرهای قابل کشیدن را با استفاده از یک حرکت فشار طولانی حرکت داد.
برای ردیابی رویدادهای نشانگر، GMSMapViewDelegate به view خود اضافه کنید.
برای اینکه یک نشانگر قابل کشیدن باشد، ویژگی GMSMarker.draggable را تنظیم کنید.
برای تنظیم متن توصیفی برای یک نشانگر، از ویژگی GMSMarker.title استفاده کنید.
به رویدادهای نشانگر پاسخ دهید
میتوانید با افزودن پروتکل GMSMapViewDelegate به نمای خود و اجرای فراخوان مربوطه به رویدادهای نشانگر پاسخ دهید. این مثال title و snippet برای یک نشانگر انتخاب شده مشخص می کند.
وقتی ویژگی draggable فعال می کنید، کاربران می توانند نشانگرها را روی نقشه با یک حرکت فشار طولانی بکشند. برای اینکه یک نشانگر قابل کشیدن باشد، ویژگی GMSMarker.draggable را روی true تنظیم کنید.
تاریخ آخرین بهروزرسانی 2025-09-13 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-13 بهوقت ساعت هماهنگ جهانی."],[[["\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,[]]