Skip to content

MapObjectTapListener callback triggered with noticeable delay after tapping.

Created by: assansh

I've encountered a problem where placemark taps are detected with quite a bit of delay, about 500-800 milliseconds.

To test things out I've added the following code to the MapObjectsActivity class in the demo project. The log shows up after at least half a second, sometimes more. Same thing happens if I try to modify something in the UI on placemark tap.

PlacemarkMapObject mark = mapObjects.addPlacemark(DRAGGABLE_PLACEMARK_CENTER);
mark.setOpacity(0.5f);
mark.setIcon(ImageProvider.fromResource(this, R.drawable.mark));
mark.addTapListener(new MapObjectTapListener() {
    @Override
    public boolean onMapObjectTap(MapObject mapObject, Point point) {
        Log.d("MapObjects", "OBJECT TAPPED " + (tapCount++) + " times");
        return true;
    }
});

I've removed the mark.setDraggable(true); statement just in case it somehow causes interference. Same problem occurs if I add an InputListener to the map itself.

Tested on default android emulator with Android 8.0, and a real HTC One M8 with Andriod 6.0

Am I doing something wrong here?