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

This code example shows how to use the following methods:
              R.string.downtown_club, R.string.heisman_trophy); 
  } 
 
  private void addMarker(GoogleMap map, double lat, double lon,
                         int title, int snippet) {
    map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                                     .title(getString(title))
                                     .snippet(getString(snippet)));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:
    bar.setListNavigationCallbacks(nav, this);
  } 
 
  private void addMarker(GoogleMap map, double lat, double lon,
                         int title, int snippet) {
    map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                                     .title(getString(title))
                                     .snippet(getString(snippet)));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:
    bar.setListNavigationCallbacks(nav, this);
  } 
 
  private void addMarker(GoogleMap map, double lat, double lon,
                         int title, int snippet) {
    map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                                     .title(getString(title))
                                     .snippet(getString(snippet)));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:position, title, visible
package com.cloud.pushpin; 
 
import android.app.AlertDialog; 
import android.content.Context; 
import android.content.DialogInterface; 
import android.content.Intent; 
import android.location.Location; 
import android.view.LayoutInflater; 
import android.view.View; 
import android.widget.AdapterView; 
import android.widget.AdapterView.OnItemSelectedListener; 
import android.widget.EditText; 
 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.MarkerOptions; 
 
public class SpinnerActivity extends MainActivity implements 
		OnItemSelectedListener {
	GoogleMap map;

6
CodeRank
This code example shows how to use the following methods:position, title, visible
package com.cloud.pushpin; 
 
 
import android.content.Context; 
import android.location.Location; 
import android.location.LocationListener; 
import android.location.LocationManager; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.widget.ArrayAdapter; 
import android.widget.Spinner; 
import android.widget.Toast; 
 
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; 
 
public class MainActivity extends FragmentActivity { 

6
CodeRank
This code example shows how to use the following methods:anchor, icon, position, snippet, title
    public OverlayItemAdapter(Drawable defaultMarker) {
        this.defaultMarker = defaultMarker;
    } 
 
    public MarkerOptions getItem(OverlayItemBase item) {
        MarkerOptions markerOptions = new MarkerOptions();
        markerOptions.anchor(0.5f, 1f);
        if (item.getTitle() != null) {
            markerOptions.title(item.getTitle().toString());
        } 
        if (item.getSnippet() != null) {
            markerOptions.snippet(item.getSnippet().toString());
        } 
        markerOptions.position(new UniversalGeoPoint(item.getGeoPoint()).createGoogleV2Point());
        Drawable itemMarker = item.getMarker();
        if (itemMarker == null) {
            itemMarker = defaultMarker;
        } 
        if (itemMarker != null) {
            if (itemMarker instanceof BitmapDrawable) {

7
CodeRank
This code example shows how to use the following methods:
    bar.setListNavigationCallbacks(nav, this);
  } 
 
  private void addMarker(GoogleMap map, double lat, double lon,
                         int title, int snippet, int hue) {
    map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                                     .title(getString(title))
                                     .snippet(getString(snippet))
                                     .icon(BitmapDescriptorFactory.defaultMarker(hue)));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:
    bar.setListNavigationCallbacks(nav, this);
  } 
 
  private void addMarker(GoogleMap map, double lat, double lon,
                         int title, int snippet) {
    map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                                     .title(getString(title))
                                     .snippet(getString(snippet)));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:draggable, icon, position, snippet, title
	 
	 
	//Ponto no mapa 
		public static MarkerOptions criarPontoNoMapa(LatLng latLng, String titulo, String subTitulo,
				BitmapDescriptor icon){
			MarkerOptions pontoVisivel = new MarkerOptions();
			pontoVisivel.position(latLng);
			pontoVisivel.icon(icon) ;
		    pontoVisivel.title(titulo);
		    pontoVisivel.snippet(subTitulo);
		    pontoVisivel.draggable(true);
			return pontoVisivel;
		} 
		 
		//Saber Cordenar de um determinado Endereco 
		public static Address buscarCoordenadasDoEndereco(String endereco, Context context) throws IOException {  
		    Geocoder geoCoder = new Geocoder(context, Locale.getDefault());// esse Geocoder aqui é quem vai traduzir o endereço de String para coordenadas double  
		    List<Address> addresses = null;//este Adress aqui recebe um retorno do metodo geoCoder.getFromLocationName vc manipula este retorno pra pega as coordenadas  
		    addresses = geoCoder.getFromLocationName(endereco, 1);
		    return addresses.get(0);         
6
CodeRank
This code example shows how to use the following methods:draggable, position, snippet, title
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

Related Android MarkerOptions Questions & Answers:

Other Android MarkerOptions Examples

23:	    map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
24:	        .getMap();
25:	    Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
26:	        .title("Hamburg"));
27:	    Marker kiel = map.addMarker(new MarkerOptions()
-
25:	    Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
26:	        .title("Hamburg"));
27:	    Marker kiel = map.addMarker(new MarkerOptions()
28:	        .position(KIEL)
29:	        .title("Kiel")

Read More

3:	
4:	// create marker
5:	MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title("Hello Maps");
6:	
7:	// Changing marker icon
-
3:	
4:	// create marker
5:	MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title("Hello Maps");
6:	
7:	// Changing marker icon

Read More

3:	
4:	// create marker
5:	MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title("Hello Maps ");
6:	
7:	// adding marker
-
3:	
4:	// create marker
5:	MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title("Hello Maps ");
6:	
7:	// adding marker

Read More

See Code Examples for Android MarkerOptions Methods: