Best code examples for Android PolygonOptions class (com.google.android.gms.maps.model.PolygonOptions)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android PolygonOptions class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android PolygonOptions examples from Open Source projects
This code example shows how to use the following methods: addAll, fillColor, strokeColor, strokeWidth
package com.manish.googlemap; 
 
import java.util.ArrayList; 
 
import android.graphics.Color; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
 
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.OnMarkerClickListener; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.model.BitmapDescriptorFactory; 
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.Polygon; 
import com.google.android.gms.maps.model.PolygonOptions; 
import com.google.android.gms.maps.model.PolylineOptions; 

6
CodeRank
This code example shows how to use the following methods: add, fillColor, 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
This code example shows how to use the following methods: strokeColor, strokeWidth, visible
package com.elias.insideglorias; 
 
import java.io.InputStream; 
import java.util.List; 
import java.util.Vector; 
 
import com.elias.kmlreader.ReaderKML; 
import com.elias.polygondouble.Point; 
import com.elias.polygondouble.Polygon; 
import com.elias.polygondouble.Polygon.Builder; 
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.SupportMapFragment; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.MarkerOptions; 
import com.google.android.gms.maps.model.PolygonOptions; 
 
import android.graphics.Color; 
import android.location.Criteria; 

6
CodeRank
This code example shows how to use the following methods: add, strokeWidth
		mMap.setOnMapLongClickListener(this);
		mMap.setOnCameraChangeListener(this);
		mMap.setOnMarkerDragListener(this);
		mMap.setOnMarkerClickListener(this);
		mMap.setMyLocationEnabled(true); //shows the location button and enables it	
		options.add(new LatLng(0,0));
		poly = mMap.addPolygon(options
				.strokeWidth(2)
                .strokeColor(Color.BLACK)
                .fillColor(0x7FB5B1E0));
	} 
	@Override 
    protected void onPause() { 
        super.onPause(); 
    } 
	 
	@Override 
	public void onMapClick(LatLng point) {
		if (inc>0){
			mkr1.get(selmkr-1).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
		hole.add(new LatLng(45.5275, -73.5925));
		hole.add(new LatLng(45.5225, -73.5925));
		hole.add(new LatLng(45.5225, -73.5975));
		hole.add(new LatLng(45.5275, -73.5975));
 
		PolygonOptions rectOptions = new PolygonOptions()
		.add(new LatLng(45.53, -73.59),
				new LatLng(45.52, -73.59),
				new LatLng(45.52, -73.60),
				new LatLng(45.53, -73.60),
				new LatLng(45.53, -73.59))
				.addHole(hole)
				.strokeColor(Color.RED)
				.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))
Full Snippet Info
4
CodeRank
Related Android PolygonOptions Questions & Answers:
See Code Examples for Android PolygonOptions Methods: