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

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

Android GoogleMap examples from Open Source projects
This code example shows how to use the following methods: animateCamera, setMyLocationEnabled
package com.novoda.mapdemo.fragment; 
 
import android.content.Context; 
import android.location.Location; 
import android.location.LocationManager; 
import android.os.Bundle; 
import android.view.LayoutInflater; 
import android.view.View; 
import android.view.ViewGroup; 
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; 
 
public class NovodaMapFragment extends SupportMapFragment {
 
    private static final int ZOOM_LEVEL = 16;
    private GoogleMap map;
 

8
CodeRank
This code example shows how to use the following methods: addMarker, animateCamera, setOnMarkerClickListener, setOnMarkerDragListener
/* 
 * Copyright (C) 2012 The Android Open Source Project 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 */ 
 
package com.example.mapdemo; 
 
import com.google.android.gms.maps.CameraUpdateFactory; 
import com.google.android.gms.maps.GoogleMap; 

6
CodeRank
This code example shows how to use the following methods: addMarker
              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)));
  } 
} 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addCircle, addMarker, clear, getCameraPosition, setLocationSource
	public MapHelperClass(GoogleMap map, int distanceWhenWPReached) {
 
		this.map = map;
		this.distanceWhenWPReached = distanceWhenWPReached;
 
		map.setLocationSource(this);
		map.setMyLocationEnabled(true);
		map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
 
		CleanMap(); 
	} 
 
	public void RedrawLines() { 
		if (WPPathPolyLine != null) {
			WPPathPolyLine.remove();
			WPPathPolyLine = null;
		} 
		PolylineOptions polylineOptions = new PolylineOptions().color(Color.CYAN).width(4);
		for (Marker m : markers) {
			polylineOptions.add(m.getPosition());

7
CodeRank
This code example shows how to use the following methods: addMarker
    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)));
  } 
} 
Full Snippet Info
7
CodeRank
Related Android GoogleMap Questions & Answers:
Other Android GoogleMap Examples
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:	
19:	  @Override

Read More

1:	
2:		// Google Map
3:		private GoogleMap googleMap;
4:	
5:		@Override

Read More

See Code Examples for Android GoogleMap Methods: