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

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

Android LatLng examples from Open Source projects
This code example shows how to use the following methods:
52:	return new LatLng(location.getLatitude(), location.getLongitude()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
54:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
129:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
140:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
151:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
74:	LatLng pos = new LatLng(loc.getLatitude(), loc.getLongitude()); 
75:	map.addMarker(new MarkerOptions().position(pos)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
154:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
60:	return location == null ? new LatLng(LONDON_LAT, LONDON_LONG) : new LatLng(location.getLatitude(), location.getLongitude()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
154:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
148:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
165:	map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
57:	LatLng l = new LatLng(location.getLatitude(), location.getLongitude()); 
-
60:	MarkerOptions mo = new MarkerOptions().position(l).title("You are here"); 
-
62:	CircleOptions co = new CircleOptions().radius(location.getAccuracy()).center(l); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
47:	LatLng locationPosition = new LatLng(location.getLatitude(), location.getLongitude()); 
-
51:	mLastMarker = mMap.addMarker(new MarkerOptions().position(locationPosition)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
156:	new LatLng(location.getLatitude(), location.getLongitude()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
24:	LatLng latLng = new LatLng(lat, lng); 
-
26:	actual = mapa.addMarker(new MarkerOptions().position(latLng).title( 
-
33:	.target(latLng)      // seteamos el centro del mapa en la posicion actual 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
133:	LatLng pos = new LatLng(Double.valueOf(station.getLatitude()), Double.valueOf(station.getLongitude())); 
-
135:	.position(pos) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
28:	LatLng latLng = new LatLng(lat, lng); 
-
31:	actual = mapa.addMarker(new MarkerOptions().position(latLng).title( 
-
37:	.target(latLng)      // seteamos el centro del mapa en la posicion actual 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
39:	CameraPosition cameraPosition = new CameraPosition.Builder().target(latLang) // Sets the center of the map to Mountain View 
-
64:	LatLng newLoc = new LatLng(location.getLatitude(), location.getLongitude()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
56:	LatLng position = new LatLng(this.latitude, this.longitude); 
-
59:	marker = map.addMarker(new MarkerOptions().position(position).title(title)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
74:	LatLng defaultLocation = new LatLng(location.getLatitude(), location.getLongitude()); 
-
77:	map.addMarker(new MarkerOptions().position(defaultLocation)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
64:	LatLng position = new LatLng(location.getLatitude(),location.getLongitude()); 
-
70:	.position(position) 
-
79:	r.getRoute(Main.this, position, destenation); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
42:	marker.setPosition(new LatLng(lat, lng)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
52:	LatLng current = new LatLng(location.getLatitude(),location.getLongitude()); 
-
55:	Marker marker = map.addMarker(new MarkerOptions().position(current).title("Current place")); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: toString
56:	LatLng cords = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude()); 
57:	textView.setText(cords.toString()); 
58:	this.map.addMarker(cords); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
54:	LatLng latLng = new LatLng(Double.parseDouble(puntoAr[0]), Double.parseDouble(puntoAr[1])); 
-
56:	mapa.addMarker(new MarkerOptions().position(latLng).title( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
110:	LatLng p = new LatLng(location.getLatitude(), location.getLongitude()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
101:	mBus.post(new LocationChangedEvent(new LatLng(location.getLatitude(), location.getLongitude()), "You are here!", true)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
30:	setContentView(R.layout.activity_map); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
30:	private GoogleMap mMap; 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: toString
168:	LatLng newLoc = new LatLng(location.getLatitude(), location.getLongitude()); 
-
172:	Toast.makeText(this, newLoc.toString(), Toast.LENGTH_LONG).show(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: toString
46:	textView.setText(point.toString()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: toString
67:	.position(point) 
-
75:	"New marker added @" + point.toString(), Toast.LENGTH_SHORT) 
-
77:	Log.e("Marker pinned @", "" + point.toString()); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: toString
94:	LatLng latLng = new LatLng(latitude, longitude); 
95:	Log.i(TAG, latLng.toString()); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: toString
213:	destination = map.addMarker(new MarkerOptions().position(point) 
-
216:	destination = map.addMarker(new MarkerOptions().position(point) 
217:	.title(point.toString())); 
-
221:	destination = map.addMarker(new MarkerOptions().position(point) 
222:	.title(point.toString())); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: toString
83:	Log.d("onMapLongClick", latLng.toString()); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: toString
50:	Toast.makeText(this, latLng.toString(), Toast.LENGTH_SHORT).show(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: equals
53:	if (mCurrentCameraTarget != null && !mCurrentCameraTarget.equals(pCamera.target)) { 
Full Snippet Info
4
CodeRank
Related Android LatLng Questions & Answers:
Other Android LatLng Examples
13:	
14:	public class MainActivity extends Activity {
15:	  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
16:	  static final LatLng KIEL = new LatLng(53.551, 9.993);
17:	  private GoogleMap map;
-
13:	
14:	public class MainActivity extends Activity {
15:	  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
16:	  static final LatLng KIEL = new LatLng(53.551, 9.993);
17:	  private GoogleMap map;
-
14:	public class MainActivity extends Activity {
15:	  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
16:	  static final LatLng KIEL = new LatLng(53.551, 9.993);
17:	  private GoogleMap map;
18:	
-
14:	public class MainActivity extends Activity {
15:	  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
16:	  static final LatLng KIEL = new LatLng(53.551, 9.993);
17:	  private GoogleMap map;
18:

Read More

1:					new LatLng(17.385044, 78.486671)).zoom(12).build();
2:	
3:	googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

Read More

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

Read More

See Code Examples for Android LatLng Methods: