Android PolylineOptions - 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 PolylineOptions class.

This code example shows how to use the following methods:addAll, color, width
package dat255.group5.chalmersonthego; 
 
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStream; 
import java.io.InputStreamReader; 
import java.net.HttpURLConnection; 
import java.net.URL; 
import java.util.ArrayList; 
import java.util.HashMap; 
import java.util.List; 
import org.json.JSONObject; 
 
import android.app.Activity; 
import android.graphics.Color; 
import android.os.AsyncTask; 
import android.util.Log; 
import android.widget.TextView; 
 
import com.example.chalmersonthego.R; 

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:color
package com.droidplanner.fragments.helpers; 
 
import java.util.List; 
 
import android.graphics.Color; 
 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.Polyline; 
import com.google.android.gms.maps.model.PolylineOptions; 
 
public class MapPath { 
	public interface PathSource { 
		public List<LatLng> getPathPoints();
	} 
 
	public Polyline missionPath;
	private GoogleMap mMap;
	private float width;
	private int color;

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:color
					Toast.LENGTH_SHORT).show();
		} 
	} 
 
	private void addFlightPathToMap() { 
		PolylineOptions flightPathOptions = new PolylineOptions();
		flightPathOptions.color(Color.argb(180, 0, 0, 200)).width(2).zIndex(1);
		flightPath = mMap.addPolyline(flightPathOptions);
	} 
 
	@Override 
	public void onMapLongClick(LatLng coord) {
		getPreferences(); 
		if (isGuidedModeEnabled) {
			drone.guidedPoint.newGuidedPoint(coord);
			markers.updateMarker(drone.guidedPoint, false,getActivity().getApplicationContext());
		} 
	} 
 
	public void updateFragment() { 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:color, width
package com.papagiannis.tuberun; 
 
import java.util.ArrayList; 
 
import android.app.Dialog; 
import android.app.ProgressDialog; 
import android.content.DialogInterface; 
import android.content.res.Resources; 
import android.graphics.Color; 
import android.location.Location; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.util.Log; 
import android.util.TypedValue; 
 
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.BitmapDescriptorFactory; 
import com.google.android.gms.maps.model.LatLng; 

5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		 
	} 
	private void printPath() { 
		List<LatLng> path = route.getPath();
		 
		PolylineOptions option = new PolylineOptions()
		.width(10)
		.color(0x550000ff)
		.visible(true)
		.geodesic(true);
		 
	 
		option.addAll(path);
		map.addPolyline(option);
		 
	} 
	 
	private float acuteBearing(LatLng from,LatLng to){
		float angle = Math.abs(calculateBearing(from,to));
		if(angle>180)
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			 
			Polyline p2 = mMap.addPolyline(new PolylineOptions().addAll(places.get(1)).geodesic(true));
				p2.setColor(Color.BLUE);
			 
			 
			Polyline p3 = mMap.addPolyline(new PolylineOptions().addAll(places.get(2)).geodesic(true));
				p3.setColor(Color.GREEN);
			 
			 
//			Polyline p4 = mMap.addPolyline(new PolylineOptions().addAll(places.get(3)).geodesic(true)); 
//				p4.setColor(Color.GREEN); 
//				Log.e("size of places", "size of places is " + places.size()); 
			//} 
		 
		} 
} 
	 
	 
	private String getJSON(String urlString){
		URL url;
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
     * @param lat la latitude du point d'origine 
     * @param lng la longitude du point d'origine 
     */ 
    private void creerNouveauPolyline(double lat, double lng) {
    	LatLng pos = new LatLng(lat, lng);
    	traces.add(carte.addPolyline(new PolylineOptions().add(pos).color(getResources().getColor(R.color.holo_blue)).visible(true)));
    } 
    /** 
     * Methode qui met la carte transparente. Permet de regler un probl�me de GoogleMaps 
     * @param group la vu qui contient la carte que l'on doit mettre transparente 
     */ 
    private void setMapTransparent(ViewGroup group) {
    	int childCount = group.getChildCount();
    	for (int i = 0; i < childCount; i++) {
	    	View child = group.getChildAt(i);
	        if (child instanceof ViewGroup) {
	            setMapTransparent((ViewGroup) child);
	        } else if (child instanceof SurfaceView) {
	            child.setBackgroundColor(0x00000000);
	        } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			reader.endArray();
			return out;
		} 
 
		private void drawPath(List<LatLng> points) {
			mMap.addPolyline(new PolylineOptions().addAll(points).width(2)
					.color(Color.RED));
		} 
 
	} 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Android PolylineOptions Questions & Answers:

See Code Examples for Android PolylineOptions Methods: