nativescript-google-maps-sdk icon indicating copy to clipboard operation
nativescript-google-maps-sdk copied to clipboard

MapView in ScrollView issue

Open bzaruk opened this issue 7 years ago • 7 comments

Hi! :) I set the MapView at the bottom of a ScrollView, the thing is that I cannot move the map location on drag because the scrollView in scrolling, and I can barley zoom in/out the map also because of the same thing. My idea is to capture when MapView in getting touch with (touch) event and cancel the Scroll process and to return it when I get touch up event...But it seems the the MapView don't to have a touch event. Have you have any idea on how can I solve it?

Thanks you very much! :)

bzaruk avatar Feb 28 '18 09:02 bzaruk

Have same problem. Is there any solution?

kayuda91 avatar Mar 29 '18 15:03 kayuda91

I got same problem on android, works fine on iPhone.

p-3 avatar Jan 07 '19 17:01 p-3

Same problem here ahah ^^

Kursorr avatar Sep 23 '19 04:09 Kursorr

Did anyone find a workaround?

andresilva-cc avatar Oct 06 '19 03:10 andresilva-cc

Here is a solution for nativescript in vue:

onCameraMove(args) {
    const scrollView = this.$refs.scrollView;
    scrollView.nativeView.__nativeView.requestDisallowInterceptTouchEvent(true);
}

thanoseleftherakos avatar Jul 10 '20 09:07 thanoseleftherakos

Any Example in Angular Code..... i have tried many options but no one fix the problem. and i think is a common use of case to have maps inside scrolls.

wkjesus avatar Aug 21 '20 00:08 wkjesus

@wkjesus probably a bit late now, but in angular you'd do something like

@ViewChild('myScrollView') myScrollView: ElementRef;

onCameraMove(args) {
    this.myScrollView.nativeElement.android.requestDisallowInterceptTouchEvent(true);
}

CalebSWhite avatar Mar 24 '22 04:03 CalebSWhite