-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom callout improvements #2581
Custom callout improvements #2581
Conversation
todo: add example todo: AIRGoogleMapCalloutSubview* todo: marker-inside-overlay-press?
todo: fix for Apple map
- Added method `getMarkersFrames(onlyVisible=false)` for `MapView` - Fix for pinch gesture
@ukrbublik Should this replace #2538 or do both go together? |
Yes, it fully replaces #2538 |
@ukrbublik Thanks for the update. Any chance you can resolve the merge conflicts in this PR for proper review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments only,
One question though - what it would take to have the "ios only" features on android too? Is a limitation of the SDK ?
@rborn Thanks for review. Updated PR. |
Fixes after rborn's review
i cant make any promises, but i will try to implement the |
@ukrbublik There seems to be a memory leak coming from https://github.com/react-native-community/react-native-maps/pull/2581/files#diff-c9a846285e908a781d4c99257a3f17fbR596 Any ideas? |
@alvelig Any ideas? |
@christopherdro |
@ukrbublik Thanks that did it. |
Seems like from #2782 leek is still present, I will take a look today |
* fixes react-native-maps#2279 todo: add example todo: AIRGoogleMapCalloutSubview* todo: marker-inside-overlay-press? * upd * additions to readme * removed unused (for now) delegate patching * lint fixes * Pass `point` at callout press events * Also pass callout frame todo: fix for Apple map * - Added prop `alphaHitTest` for `Callout` - Added method `getMarkersFrames(onlyVisible=false)` for `MapView` - Fix for pinch gesture * lint fixes * added `getMarkersFrames` to docs * fix * Added `zoomTapEnabled` for `MapView` * Added redrawCallout * Fixes after rborn's review
Added new feature - handling press on callout subview for iOS.
This required adding new component
<CalloutSubview />
withonPress
event.See "Custom Callouts" (Callouts.js) example.
Added prop
alphaHitTest
forCallout
.If
true
, press on transparent areas in custom callout will be passed to map (will hide current callout or open callout of another marker positioned at touch point).It's very useful for custom callouts with big transparent areas. At example bottom part of custom callout is transparent (except arrow).
Added prop
zoomTapEnabled
forMapView
.If
false
user won't be able to double tap to zoom the map. BUT it will greatly decrease delay of single tap gesture recognition in Google Maps for iOS so callouts will open much faster!Added method
redrawCallout
forMarker
. Useful for Google Maps on iOS.Also added method
getMarkersFrames(onlyVisible=false)
forMapView
.It gathers all (or only visible) markers and return their frames and centers in pixels.
See "FitToCoordinates" example.
It's not related to callouts but uses same new methods I added in this PR and can be useful on JS-side.
Does any other open PR do the same thing?
It's improved version of my past PR #2538
What issue is this PR fixing?
#2279
How did you test this PR?
Change affects iOS, both Google & Apple map providers.
Tested in iOS simulator and real devices.