Skip to content Skip to sidebar Skip to footer

Google Maps Android Api - Trigger Touch Event On Map

I need a way to trigger/fire a map touch event programmatically. Is there any solution? Update 1: I have map and a kmlLayer on it. the kmlLayer has only a click event but in my cas

Solution 1:

you can try this...

googleMap.setOnCameraMoveStartedListener(new GoogleMap.OnCameraMoveStartedListener() {
    @Override
    public void onCameraMoveStarted(int reason) {
        if (reason == REASON_GESTURE) {
            // The user gestured on the map.
        } else if (reason == REASON_API_ANIMATION) {
            // The user tapped something on the map.
        } else if (reason == REASON_DEVELOPER_ANIMATION) {
            // The app moved the camera.
        }
    }
});

Post a Comment for "Google Maps Android Api - Trigger Touch Event On Map"