Monday, April 8, 2013

Detect user click on Map

To detect click on GoogleMap we implement OnMapClickListener Interface.
We add to our GoogleMap setOnMapClickListener . This sets a callback to the Interface when the map is clicked

Then we need to override the onMapClick(LatLng point) 


@Override 
public void onMapClick(LatLng point) { mMap.animateCamera(CameraUpdateFactory.newLatLng(point)); }


We are using CameraUpdateFactory to get a new CameraUpdate Object ( an object to modify a map's camera ) and animate to the new point with animateCamera.

1 comment:

  1. Online Casinos for Real Money | Urban Meyer
    Casinos for Real Money — Online Casinos for Real Money The best febcasino place to play 카지노사이트 online casino games for worrione real money. Casinos for Real Money.

    ReplyDelete