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

This code example shows how to use the following methods:compassEnabled, mapType, rotateGesturesEnabled, tiltGesturesEnabled
	 
	// method for creating and returing a google map options object 
	// for passing into the 'setFragmentOptions' method 
	public static GoogleMapOptions createOptions(boolean hasCompass, boolean canRotate, boolean canTilt, int mapType)
	{  
		GoogleMapOptions options = new GoogleMapOptions();
		 
		// set the map options parameters from the passed in arguments 
			options.compassEnabled(hasCompass);
			options.rotateGesturesEnabled(canRotate);
			options.tiltGesturesEnabled(canTilt);
			options.mapType(mapType);
			 
		return options;
	} 
	 
	// method for setting the map fragment initial options 
	public static MapFragment setFragmentOptions(GoogleMapOptions options)
	{ 
		// creates a new map fragment with the passed in google map options object 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:zOrderOnTop
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		setHasOptionsMenu(true); 
		GoogleMapOptions op = new GoogleMapOptions();
		op.zOrderOnTop(true);
		this.newInstance(op);
	} 
 
	@Override 
	public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
		if (this.menu != 0) {
			inflater.inflate(this.menu, menu);
		} 
	} 
 
	@Override 
	public boolean onContextItemSelected(android.view.MenuItem item) {
		return super.onContextItemSelected(item);
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:camera
    public void onSaveInstanceState(Bundle outState)
    { 
        if (this.mMap != null)
        { 
            // Store the current map specific look 
            GoogleMapOptions mapOptions = new GoogleMapOptions();
            mapOptions.camera(this.mMap.getCameraPosition());
            outState.putParcelable(SAVE_MAP_OPTIONS, mapOptions);
        } 
         
        super.onSaveInstanceState(outState);
    } 
 
 
    /* (non-Javadoc) 
     * @see android.support.v4.app.Fragment#onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater) 
     */ 
    @Override 
    public void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater)
    { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	            setMarkers(mData);
	        } 
 
	    } 
		private GoogleMap Mmap;
		GoogleMapOptions options = new GoogleMapOptions();
 
		 
		@SuppressLint("NewApi") 
		@Override 
		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState); 
			 
			//Compuebo q este el array para parsearlo 
			if(mData == null){ 
				opciones=MainActivity.opciones; 
		    	new DownloadTask().execute(opciones); 
			} 
			 
			 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
import com.google.android.gms.maps.model.MarkerOptions; 
 
public class mapdemo extends FragmentActivity { 
	private GoogleMap mMap;
	private iuGeoCoder gc = new iuGeoCoder();
	private GoogleMapOptions options = new GoogleMapOptions();
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.mapdemo);         
//      setUpMapIfNeeded(); 
        mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
        options.mapType(GoogleMap.MAP_TYPE_SATELLITE)
        	.rotateGesturesEnabled(true)
        	.tiltGesturesEnabled(false);
        mMap.addMarker(new MarkerOptions()
        	.position(new LatLng(-33.796923, 150.922433))
        	.title("我是赵翔辰")
        	.snippet("Population: 4,137,400")
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
public class ShowResult extends Activity {
	private TextView text;
	private GoogleMap mMap;
	private LatLng location;
	GoogleMapOptions googleOptions = new GoogleMapOptions();
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.show_result_1);
		googleOptions.mapType(GoogleMap.MAP_TYPE_SATELLITE)
				.compassEnabled(true);
		MapFragment.newInstance(googleOptions);
		// text = (TextView) findViewById(R.id.textView1); 
		Intent intent = getIntent();
		double[] loc = intent.getDoubleArrayExtra("Location");
		location = new LatLng(loc[0], loc[1]);
 
		mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
package com.siste; 
 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.GoogleMapOptions; 
 
public class Principal extends FragmentActivity { 
	 
	GoogleMapOptions options = new GoogleMapOptions();
 
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_principal); 
		 
		options.mapType(GoogleMap.MAP_TYPE_SATELLITE)
	    .compassEnabled(true)

4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android GoogleMapOptions Questions & Answers:

See Code Examples for Android GoogleMapOptions Methods: