Code example for GoogleMap

Methods: addCirclesetInfoWindowAdapter

0
package fr.xebia.workshop.android.ui; 
 
import android.content.BroadcastReceiver; 
import android.content.Context; 
import android.content.Intent; 
import android.content.IntentFilter; 
import android.graphics.Bitmap; 
import android.graphics.BitmapFactory; 
import android.graphics.drawable.BitmapDrawable; 
import android.location.Location; 
import android.media.ThumbnailUtils; 
import android.os.AsyncTask; 
import android.os.Bundle; 
import android.util.Log; 
import android.view.LayoutInflater; 
import android.view.View; 
import android.widget.ImageView; 
import android.widget.TextView; 
import android.widget.Toast; 
import com.google.android.gms.location.ActivityRecognitionResult; 
import com.google.android.gms.location.DetectedActivity; 
import com.google.android.gms.location.Geofence; 
import com.google.android.gms.location.LocationClient; 
import com.google.android.gms.maps.CameraUpdateFactory; 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.model.*; 
import com.google.android.gms.plus.model.people.Person; 
import fr.xebia.workshop.android.R; 
 
import java.io.InputStream; 
 
public class MapFragment extends SupportMapFragment implements GoogleMap.InfoWindowAdapter {
 
    private GoogleMap map;
    private Person currentPerson;
    private String currentPersonActivity = "Searching activity...";
    private Marker currentPersonMarker;
    private String loadedImageUrl;
    private ActivityRecognitionReceiver activityRecognitionReceiver;
    private Bitmap mIcon11;
 
    @Override 
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setRetainInstance(true); 
        activityRecognitionReceiver = new ActivityRecognitionReceiver();
        getActivity().registerReceiver(activityRecognitionReceiver, new IntentFilter(ActivityRecognitionReceiver.ACTION));
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        setUpMap(); 
    } 
 
    @Override 
    public void onDestroy() { 
        getActivity().unregisterReceiver(activityRecognitionReceiver);
        super.onDestroy(); 
    } 
 
    private void setUpMap() { 
        map = getMap();
        if (map == null) {
            Toast.makeText(getActivity(), "Maps initialization failed", Toast.LENGTH_LONG).show();
            getActivity().finish(); 
        } 
        map.setInfoWindowAdapter(this);
        map.addCircle(new CircleOptions().center(new LatLng(48.879593, 2.415551)).radius(100));
    } 
 
    public void updatePersonInfo(Person currentPerson) {
        this.currentPerson = currentPerson;
        if (currentPersonMarker != null) {
Connect your IDE to all the code out there  Get Codota for Java