Android : GestureOverlayvew over Google map Vew

on Saturday, October 25, 2014


I was just curious that I am trying to add gestureoverlayview over google mapview. Gesture works properly but map cannot be seen gestureoverlay over mapview


my fragment layout file is



`<?xml version="1.0" encoding="utf-8"?>
<android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gestures"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@null"
android:gestureStrokeType="multiple"
android:eventsInterceptionEnabled="true"
android:orientation="vertical">



<LinearLayout
android:id="@+id/map_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>

</android.gesture.GestureOverlayView>


I added map programatcally. which is



FragmentManager fm = getChildFragmentManager();
fragment = (SupportMapFragment) fm.findFragmentById(R.id.map_holder);
if (fragment == null) {
fragment = SupportMapFragment.newInstance();
fm.beginTransaction().replace(R.id.map_holder, fragment).commit();
}
`


Can anyone suggest me 1)how do it correctly and also 2) how to pass touch to map so that I can move map to a certain location and apply gesture there!!


0 comments:

Post a Comment