Code example for GoogleMap

Methods: addCircle, addMarker, moveCamera

0
        Log.d(LOGTAG, "onCreate");
    } 
 
    private void setPositionAndMarker(float lat, float lon, float accuracy) {
        LatLng poi = new LatLng(lat, lon);
        Marker hamburg = mMap.addMarker(new MarkerOptions().position(poi).title("You're Here"));
 
        // Move the camera instantly to poi with a zoom of 15. 
        mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(poi, 15));
 
        // Zoom in, animating the camera. 
        //        mMap.animateCamera(CameraUpdateFactory.zoomTo(20), 2000, null); 
 
        mMap.addCircle(new CircleOptions()
                                     .center(poi)
                                     .radius(accuracy)
                                     .strokeColor(Color.RED)
                                     .fillColor(Color.argb(30, 0, 153, 255))
                                     .strokeWidth(2));
    }