Android CircleOptions - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android CircleOptions class.

This code example shows how to use the following methods:center, fillColor, radius, strokeColor, strokeWidth
package com.lb.logic; 
 
import java.util.Iterator; 
import java.util.List; 
 
import com.lb.R; 
import com.google.android.gms.maps.CameraUpdate; 
import com.google.android.gms.maps.CameraUpdateFactory; 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.GoogleMap.OnMapClickListener; 
import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener; 
import com.google.android.gms.maps.GoogleMap.OnMyLocationChangeListener; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.UiSettings; 
import com.google.android.gms.maps.model.BitmapDescriptorFactory; 
import com.google.android.gms.maps.model.CameraPosition; 
import com.google.android.gms.maps.model.Circle; 
import com.google.android.gms.maps.model.CircleOptions; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.Marker; 

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:center, fillColor, radius, strokeColor, strokeWidth
package jp.hackugyo.gatemail.ui.activity; 
 
import android.graphics.Color; 
import android.os.Bundle; 
 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.model.BitmapDescriptorFactory; 
import com.google.android.gms.maps.model.CircleOptions; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.Marker; 
import com.google.android.gms.maps.model.MarkerOptions; 
import com.google.android.gms.maps.model.PolygonOptions; 
 
import jp.hackugyo.gatemail.R; 
import jp.hackugyo.gatemail.model.withoutdb.MapField; 
import jp.hackugyo.gatemail.ui.AbsFragmentActivity; 
import jp.hackugyo.gatemail.util.LogUtils; 
 

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:center, fillColor, radius, strokeColor
package com.android.lonoti.activies.map; 
 
import java.util.HashMap; 
import java.util.List; 
import java.util.Map; 
 
import com.android.lonoti.R; 
import com.android.lonoti.R.id; 
import com.android.lonoti.R.layout; 
import com.android.lonoti.R.menu; 
import com.android.lonoti.activities.LonotiEventCreate; 
import com.android.lonoti.adapter.PlacesAutoCompleteAdapter; 
import com.android.lonoti.adapter.PopupAdapter; 
import com.android.lonoti.adapter.data.MarkerContent; 
import com.android.lonoti.bom.payload.Location; 
import com.android.lonoti.exception.LocationException; 
import com.android.lonoti.exception.NetworkException; 
import com.android.lonoti.location.LonotiLocationManager; 
import com.android.lonoti.location.LonotiLocationPlaces; 
import com.android.lonoti.network.LonotiAsyncServiceRequest; 

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 * Draw a dot at provided location 
	 * @param pos 
	 * @param color 
	 */ 
	private void showDotAtLoc(LatLng pos, int color ) {		
		map.addCircle(new CircleOptions()
				.center(pos)
				.fillColor(color)
				.radius(0.5)
				.strokeColor(color)
				.strokeWidth(1f));
	} 
 
	private void centerOnMe() { 
		map.moveCamera(CameraUpdateFactory.newLatLng(currentPosition));
		map.animateCamera(CameraUpdateFactory.zoomTo(18), 500, null);
	} 
 
	/** 
	 * We check if the google play lib is installed 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
				.fillColor(Color.BLUE);
 
		Polygon polygon = mMap.addPolygon(rectOptions);
		 
		// And sure, why not, a CIRCLE 
		CircleOptions circleOptions = new CircleOptions()
		.center(new LatLng(45.525, -73.595))
		.radius(100); 
 
		Circle circle = mMap.addCircle(circleOptions);
 
	} 
 
 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
			 
			float homeRadius = this.homeManager.getRadius();
			LatLng homeLatLng = new LatLng(this.homeManager.getLatitude(), this.homeManager.getLongitude());
			 
			this.getMap().addMarker(new MarkerOptions().draggable(true).position(homeLatLng).title(this.getString(R.string.home)).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_menu_home)));
			this.getMap().addCircle(new CircleOptions().center(homeLatLng).radius(homeRadius).fillColor(Color.parseColor("#CCFF00")));
			 
			CameraUpdate position = CameraUpdateFactory.newLatLngZoom(homeLatLng, 14);
			Location userLocation = this.getMap().getMyLocation();
			if (userLocation != null) {
				float[] distanceBetween = new float[1];
				Location.distanceBetween(homeLatLng.latitude, homeLatLng.longitude, userLocation.getLatitude(), userLocation.getLongitude(), distanceBetween);
				if (distanceBetween[0] > 10 * homeRadius) {
					LatLng userLatLng = new LatLng(userLocation.getLatitude(), userLocation.getLongitude());
					position = CameraUpdateFactory.newLatLngBounds(LatLngBounds.builder().include(homeLatLng).include(userLatLng).build(), 10);
				} 
			} 
			 
			this.getMap().moveCamera(position);
		} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	void addDefaultMarkersToMap() { 
		LatLng mapCenter = map.getCameraPosition().target;
		HomeMarker = map.addMarker(new MarkerOptions().position(mapCenter).title("Home").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)).draggable(true));
		PositionHoldMarker = map.addMarker(new MarkerOptions().position(mapCenter).title("PositionHold").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));
		CurrentWPCircle = map.addCircle(new CircleOptions().center(mapCenter).radius(distanceWhenWPReached).fillColor(Color.argb(50, 0, 255, 50)));
		CurrentWPCircle.setStrokeWidth(2);
	} 
 
	@Override 
	public void activate(OnLocationChangedListener onLocationChangedListener) {
		this.onLocationChangedListener = onLocationChangedListener;
	} 
 
	@Override 
	public void deactivate() { 
		this.onLocationChangedListener = null;
	} 
 
	public static double gps2m(double lat_a, double lng_a, double lat_b, double lng_b) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
				    CameraUpdateFactory.newCameraPosition(  
				      cameraPosition));  
				}   
		 
		public static CircleOptions criarCliculo(LatLng centro, int raios){
			CircleOptions circleOptions = new CircleOptions()
		    .center(centro)
		    .radius(raios); // In meters
			return circleOptions;
		} 
		 
		 
		public static void ativarBotaoDeLocalizacao(GoogleMap map){
			map.getUiSettings().setMyLocationButtonEnabled(true);
		} 
 
		public static void desenharTrafegoNoMapa(GoogleMap map){
			map.setTrafficEnabled(true);map.setMyLocationEnabled(true);
		} 
		 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            radiusMarker = mMap.addMarker(new MarkerOptions() 
                    .position(toRadiusLatLng(center, radius)) 
                    .draggable(true) 
                    .icon(BitmapDescriptorFactory.defaultMarker( 
                            BitmapDescriptorFactory.HUE_AZURE))); 
            circle = mMap.addCircle(new CircleOptions() 
                    .center(center) 
                    .radius(radius) 
                    .strokeWidth(mWidthBar.getProgress()) 
                    .strokeColor(mStrokeColor) 
                    .fillColor(mFillColor)); 
        } 
        public DraggableCircle(LatLng center, LatLng radiusLatLng) { 
            this.radius = toRadiusMeters(center, radiusLatLng); 
            centerMarker = mMap.addMarker(new MarkerOptions() 
                    .position(center) 
                    .draggable(true)); 
            radiusMarker = mMap.addMarker(new MarkerOptions() 
                    .position(radiusLatLng) 
                    .draggable(true) 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		LatLng l = new LatLng(location.getLatitude(), location.getLongitude());
		gMap.clear();
		gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(l, 13));
		MarkerOptions mo = new MarkerOptions().position(l).title("You are here");
		gMap.addMarker(mo);
		CircleOptions co = new CircleOptions().radius(location.getAccuracy()).center(l);
		gMap.addCircle(co);	
	} 
	 
	@Override 
	protected void onStop() { 
		super.onStop(); 
		locationFinder.stopUsingGPS();
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android CircleOptions Questions & Answers:

See Code Examples for Android CircleOptions Methods: