Java Code Examples for com.google.android.gms.maps.model.CircleOptions#radius()
The following examples show how to use
com.google.android.gms.maps.model.CircleOptions#radius() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShapeActivity.java From Complete-Google-Map-API-Tutorial with Apache License 2.0 | 5 votes |
private void addCircle() { googleMap.clear(); CircleOptions circleOptions = new CircleOptions(); circleOptions.center(new LatLng(37, 67)); circleOptions.radius(100000); circleOptions.strokeColor(Color.RED); circleOptions.strokeWidth(10f); circleOptions.strokePattern(PATTERN_MIXED); circleOptions.clickable(true); circleOptions.fillColor(Color.GREEN); googleMap.addCircle(circleOptions).setTag(new CustomTag("circle")); googleMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(37, 67))); }
Example 2
Source File: MapFragment.java From Android-GoogleMaps-Part1 with BSD 2-Clause "Simplified" License | 5 votes |
private void drawCircle( LatLng location ) { CircleOptions options = new CircleOptions(); options.center( location ); //Radius in meters options.radius( 10 ); options.fillColor( getResources().getColor( R.color.fill_color ) ); options.strokeColor( getResources().getColor( R.color.stroke_color ) ); options.strokeWidth( 10 ); getMap().addCircle(options); }
Example 3
Source File: MapFragment.java From AndroidDemoProjects with Apache License 2.0 | 5 votes |
private void drawCircle( LatLng location ) { CircleOptions options = new CircleOptions(); options.center( location ); //Radius in meters options.radius( 10 ); options.fillColor( getResources().getColor( R.color.fill_color ) ); options.strokeColor( getResources().getColor( R.color.stroke_color ) ); options.strokeWidth( 10 ); getMap().addCircle(options); }