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? |
|
@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 />withonPressevent.See "Custom Callouts" (Callouts.js) example.
Added prop
alphaHitTestforCallout.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
zoomTapEnabledforMapView.If
falseuser 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
redrawCalloutforMarker. 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.