Code example for Projection

Methods: fromScreenLocation, toScreenLocation

0
package com.ecs.google.maps.v2.util; 
 
import java.util.List; 
 
import android.graphics.Point; 
import android.os.Handler; 
import android.os.SystemClock; 
import android.view.animation.BounceInterpolator; 
import android.view.animation.Interpolator; 
 
import com.google.android.gms.maps.CameraUpdateFactory; 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.Projection; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.LatLngBounds; 
import com.google.android.gms.maps.model.Marker; 
 
public class Utils { 
 
	public static void bounceMarker(GoogleMap googleMap,final Marker marker) {
	//Make the marker bounce 
    final Handler handler = new Handler();
     
    final long startTime = SystemClock.uptimeMillis();
    final long duration = 2000;
     
    Projection proj = googleMap.getProjection();
    final LatLng markerLatLng = marker.getPosition();
    Point startPoint = proj.toScreenLocation(markerLatLng);
    startPoint.offset(0, -100);
    final LatLng startLatLng = proj.fromScreenLocation(startPoint);
 
    final Interpolator interpolator = new BounceInterpolator();
 
    handler.post(new Runnable() {
        @Override