Skip to content

fix: re-layout recycled marker views so Google markers get added - #97

Merged
lodev09 merged 1 commit into
mainfrom
fix/recycled-marker-layout
Sep 28, 2026
Merged

lodev09 merged 1 commit into
mainfrom
fix/recycled-marker-layout

Conversation

@lodev09

@lodev09 lodev09 commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up regression from #96. That change gates the Google marker add on didLayout, so layoutSubviews became the only path that adds a marker with a custom view.

Recycled marker views never hit that path: prepareForRecycle resets _didLayout, but children mount into _iconView and the marker's own frame is often re-applied unchanged, so UIKit never schedules layoutSubviews on the marker. _didLayout stays NO and the marker never appears.

Fix: call setNeedsLayout after resetting _didLayout in mountChildComponentView / unmountChildComponentView so the marker always runs a layout pass and fires markerViewDidLayout.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Test Plan

  • iOS Google provider: toggle markers with custom views on and off (list re-render) so views get recycled. Markers should render every time.
  • Apple provider unaffected (never gated on didLayout).
  • Android unaffected (no view recycling; fix: defer Google marker add until custom view lays out #96 guard only covers the pre-map pending queue).

Screenshots / Videos

N/A

Checklist

  • I tested on iOS
  • I tested on Android
  • I tested on Web
  • I updated the documentation (if needed)

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lugg-maps Ready Ready Preview Sep 28, 2026 7:51pm UTC

Request Review

@lodev09
lodev09 merged commit 2114022 into main Sep 28, 2026
5 checks passed
@lodev09
lodev09 deleted the fix/recycled-marker-layout branch September 28, 2026 19:57

This branch was successfully deployed

1 active deployment
Preview — 6817650b Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant