0

Hi I am developing small android application in which I am using android map V2. I include ground overlay item in my map. So I want to detect click on overlay item. I added overlay item in following manner.

 LatLng NEWARK = new LatLng(0, 0);

        GroundOverlayOptions newarkMap = new GroundOverlayOptions()
                //.image(BitmapDescriptorFactory.fromResource(R.drawable.img)
                  .image(BitmapDescriptorFactory.fromBitmap(createDrawableFromView(this, markerView)))
                .position(NEWARK, 860000f, 650000f);
        GroundOverlay imageOverlay = googleMap.addGroundOverlay(newarkMap);

So I want to do something when user clicks on this overlay item. Need Some help. Thank you.

nilkash
  • 7,408
  • 32
  • 99
  • 176

2 Answers2

1

You can listen it via googleMap.setOnGroundOverlayClickListener()

Farhad
  • 189
  • 4
0

There are no OnClickListeners other than for Markers.

You may want to work with OnMapClickListener, where you get LatLng and do the check for distance yourself.

MaciejGórski
  • 22,187
  • 7
  • 70
  • 94