Skip to content

Handle annotations without images on iOS map snapshot#2423

Merged
christopherdro merged 2 commits intoreact-native-maps:masterfrom
caseyt:snapshot-annotation-views
Apr 13, 2019
Merged

Handle annotations without images on iOS map snapshot#2423
christopherdro merged 2 commits intoreact-native-maps:masterfrom
caseyt:snapshot-annotation-views

Conversation

@caseyt
Copy link
Copy Markdown
Contributor

@caseyt caseyt commented Aug 10, 2018

Does any other open PR do the same thing?

No

What issue is this PR fixing?

#1163

How did you test this PR?

  1. Add 2 <Marker>'s to a MapView, one with an image={} prop, one with subviews.
  2. Call takeSnapshot on MapView.
  3. Both annotations should exist on the generated image.

This has been tested on iOS device and simulator.

@caseyt
Copy link
Copy Markdown
Contributor Author

caseyt commented Aug 10, 2018

I also moved the annotation rendering logic to be after the overlay rendering logic, so that annotations will render above everything else.

@christopherdro christopherdro merged commit fd745b7 into react-native-maps:master Apr 13, 2019
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
…aps#2423)

* Render annotation view heirarchy to CGContext if annotation does not have an image.

* add annotations to snapshot image after overlays.
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.

2 participants