Beispiel #1
0
  // Handles the initialization of the map if required
  private void setUpMapIfNeeded() {

    // Do a null check to confirm that we have not already instantiated the map.
    if (map == null) {

      MapFragment fragment = ((MapFragment) getFragmentManager().findFragmentById(R.id.GMap));

      // Makes sure that the map fragment exists before attempting to inflate the map
      if (fragment != null) {
        map = fragment.getMap();
      } else {
        Toast.makeText(getBaseContext(), "Something went wrong", Toast.LENGTH_LONG).show();
      }

      // Confirm we were successful in obtaining the map.
      if (map != null) {

        // Checks to see if we have custom coordinates so we can zoom in on them
        if (lat != 43.6481 || lon != -79.4042) {
          map.moveCamera(CameraUpdateFactory.zoomTo(16));
        } else {
          map.moveCamera(CameraUpdateFactory.zoomTo(12));
        }

        // Sets the initial camera position
        map.moveCamera(CameraUpdateFactory.newLatLng(coords));

        if (lat != 43.6481 || lon != -79.4042) {

          // Generates the polygons showing the risk of a zone
          generatePolygons();

          // Marks the current search point
          MarkerOptions marker = new MarkerOptions().position(coords).title("Search Zone");
          map.addMarker(marker);
        }

        // Sets a one use listener for clicks to the map
        map.setOnMapClickListener(
            new OnMapClickListener() {

              // Adds a marker to the map if the user clicks to search there
              @Override
              public void onMapClick(LatLng point) {

                searchHere = point;
                map.clear();
                map.addMarker(new MarkerOptions().position(point).title("Search Here"));
              }
            });
      }
    }
  }
Beispiel #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View layoutView = inflater.inflate(R.layout.map_frag, container, false);

    // Get the location manager
    locationManager = (LocationManager) myContext.getSystemService(Context.LOCATION_SERVICE);
    // Define the criteria how to select the locatioin provider -> use
    // default
    Criteria criteria = new Criteria();
    provider = locationManager.getBestProvider(criteria, false);
    Location location = locationManager.getLastKnownLocation(provider);
    LatLng latLng;
    if (location != null) {
      latLng = new LatLng(location.getLatitude(), location.getLongitude());
    } else {
      latLng = new LatLng(39.864052799999996, -75.12900809999996);
    }

    map = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();

    // Move the camera instantly to hamburg with a zoom of 15.
    map.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));

    // Zoom in, animating the camera.
    map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);

    return layoutView;
  }
  @Override
  public void onMapReady(GoogleMap map) {
    //        LatLng Kazik = new LatLng(51.2351792, 22.5469426);
    //        map.addMarker(new MarkerOptions().position(Kazik).title("Klub Kazik"));
    //        map.moveCamera(CameraUpdateFactory.newLatLng(Kazik));
    //
    //        LatLng Silence = new LatLng(51.2464403, 22.5415827);
    //        map.addMarker(new MarkerOptions().position(Silence).title("Klub Silence"));
    //        map.moveCamera(CameraUpdateFactory.newLatLng(Silence));
    //
    //        LatLng Shine = new LatLng(51.2491831, 22.5507555);
    //        map.addMarker(new MarkerOptions().position(Shine).title("Klub Shine"));
    //        map.moveCamera(CameraUpdateFactory.newLatLng(Shine));
    //
    //        LatLng Czekolada = new LatLng(51.2470281, 22.5610082);
    //        map.addMarker(new MarkerOptions().position(Czekolada).title("Klub Czekolada"));
    //        map.moveCamera(CameraUpdateFactory.newLatLng(Czekolada));

    this.map = map;
    LatLng Miejsce = new LatLng(51.2323839, 22.5575203);
    this.map.addMarker(
        new MarkerOptions().position(Miejsce).title(wydarzenie.getMiejsce().getNazwa()));
    this.map.moveCamera(CameraUpdateFactory.newLatLng(Miejsce));
    this.map.moveCamera(CameraUpdateFactory.zoomTo(15));
  }
 @Override
 public void onMapReady(GoogleMap googleMap) {
   LatLng latLng = new LatLng(23.156116, 113.445332);
   mMap.addMarker(new MarkerOptions().position(latLng).flat(true).title("Marker here"));
   mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
   mMap.animateCamera(CameraUpdateFactory.zoomTo(15));
 }
  private void init() {
    cnt = 0;
    GooglePlayServicesUtil.isGooglePlayServicesAvailable(MapsActivity.this);
    mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();

    lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    locationListener = new MyLocationListener();
    lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 10, locationListener);

    // GPS ������� ��������
    gps = new GPSInfo(MapsActivity.this);
    locationListener = new MyLocationListener();

    if (gps.isGetLocation()) {
      double latitude = gps.getLatitude();
      double longitude = gps.getLongitude();

      // Creating a LatLng object for the current location
      LatLng latLng = new LatLng(latitude, longitude);

      // Showing the current location in Google Map
      mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));

      // Map �� zoom �մϴ�.
      mMap.animateCamera(CameraUpdateFactory.zoomTo(15));

      mMap.addMarker(new MarkerOptions().position(latLng).title("My"));
    }
  }
  public static void makeBoatMarker() {
    map.setMyLocationEnabled(true);
    // map.moveCamera(CameraUpdateFactory.newLatLngZoom(new
    // LatLng(ConnectScreen.boat.getPoseX(),ConnectScreen.boat.getPoseY()), 15));
    map.animateCamera(CameraUpdateFactory.zoomTo(17.0f));

    //			Handler handle = new Handler();
    //			handle.post(new Runnable()
    //				{
    //					@Override
    //					public void run()
    //						{
    // LatLng boatLoc = new LatLng(ConnectScreen.boat.getPoseX(),ConnectScreen.boat.getPoseY());
    LatLng boatLoc = new LatLng(0588399.2171, 4477511.8839);
    boat2 =
        map.addMarker(
            new MarkerOptions()
                .anchor(.5f, .5f)
                .flat(true)
                .rotation(270)
                .title("Boat 1")
                .snippet("IP Address: 192.168.1.1")
                .position(boatLoc)
                .flat(true)

            // .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))
            );
  }
  @Override
  public void onResume() {
    if (getMap() != null && getView() != null) {
      // Ponemos que inicie el mapa en el Kiosko de Surbus
      getMap().moveCamera(CameraUpdateFactory.newLatLng(coordenadas));
      getMap().setMapType(GoogleMap.MAP_TYPE_HYBRID);
      getMap().setMyLocationEnabled(true);
      getMap().setOnMyLocationChangeListener(this);
      getMap().moveCamera(CameraUpdateFactory.zoomTo(15));
      getMap()
          .setOnMarkerClickListener(
              new OnMarkerClickListener() {

                @Override
                public boolean onMarkerClick(Marker marker) {
                  synchronized (DataStorage.paradas) {
                    Parada p = DataStorage.paradas.get(Integer.parseInt(marker.getTitle()));
                    DialogFragment f = MostrarInfoParada.newInstance(p.getId());
                    f.show(getActivity().getSupportFragmentManager(), "Info");
                  }
                  return true;
                }
              });
      bitmapParada = BitmapDescriptorFactory.fromResource(R.drawable.bus_stop);
      buscarParadas();
    }
    super.onResume();
  }
 public void setZoomLevel(int zoomLevel) {
   this.zoomLevel = zoomLevel;
   if (googleMap != null) {
     CameraUpdate zoom = CameraUpdateFactory.zoomTo(this.zoomLevel);
     googleMap.animateCamera(zoom);
   }
 }
  private void setUpMap() {

    if (showRoute == false) {
      mMap.addMarker(
          new MarkerOptions()
              .position(CAFETERIA)
              .title("Cafeteria")
              .snippet("Hochschule Karlsruhe"));
      mMap.moveCamera(CameraUpdateFactory.newLatLng(CAFETERIA));
      mMap.animateCamera(CameraUpdateFactory.zoomTo(17.00f));
    } else if (showRoute == true) {
      String uri =
          "http://maps.google.com/maps?saddr="
              + standortLatitude
              + ","
              + standortLongitude
              + "&daddr="
              + 49.01578
              + ","
              + 8.39137;
      Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
      intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
      startActivity(intent);
    }
  }
  public void changeMap(LatLng latLng) {
    // Show the current location in Google Map
    mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));

    // Zoom in the Google Map
    mMap.animateCamera(CameraUpdateFactory.zoomTo(14));
  }
Beispiel #11
0
 @Override
 public void onLocationChanged(Location location) {
   double latitude = location.getLatitude();
   double longitude = location.getLongitude();
   LatLng latLng = new LatLng(latitude, longitude);
   mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
   mMap.animateCamera(CameraUpdateFactory.zoomTo(15));
 }
 @Override
 public void BuildMap() {
   map = fragment.getMap();
   map.addMarker(
       new MarkerOptions().position(pontoCentralFatec()).title(ConstantsMenus.TITULO_PONTO));
   map.moveCamera(CameraUpdateFactory.newLatLng(pontoCentralFatec()));
   map.animateCamera(CameraUpdateFactory.zoomTo(15));
 }
 private void setUpCurrentPositionPin(LatLng current) {
   mMap.setMapType(MAP_TYPE_NORMAL);
   mMap.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
   if (current != null) {
     mMap.addMarker(new MarkerOptions().position(current).title(current.toString()));
     mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 20));
   }
 }
Beispiel #14
0
  private void setUpMapIfNeeded() {

    // Do a null check to confirm that we have not already instantiated the map.
    if (norwayMap == null) {
      // Try to obtain the map from the SupportMapFragment.
      norwayMap =
          ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
      // Hide the zoom controls as the button panel will cover it
      norwayMap.getUiSettings().setZoomControlsEnabled(true);

      // Set map type getting configuration from Sharedsettings
      /*MapConfiguration mConf = new MapConfiguration();

      SharedPreferences mapSettings = getSharedPreferences("mapType", 0);
      boolean mTypeNormal = mapSettings.getBoolean("normal", false);
      boolean mTypeSatellite = mapSettings.getBoolean("satellite", false);
      boolean mTypeTerrain = mapSettings.getBoolean("terrain", false);*/

      /*if (mTypeNormal) {
          mMap.setMapType(1);

      }
      if (mTypeSatellite) {
          mMap.setMapType(2);

      }
      if (mTypeTerrain) {
          mMap.setMapType(3);

      }*/

      // Set default camera position and zoom
      LatLng defaultlLatLong = new LatLng(60.8175897, 11.0134724);
      CameraUpdate center = CameraUpdateFactory.newLatLng(defaultlLatLong);
      CameraUpdate zoom = CameraUpdateFactory.zoomTo(5);
      norwayMap.moveCamera(center);
      norwayMap.animateCamera(zoom);

      // Buildings enabled
      norwayMap.setBuildingsEnabled(true);

      // Check if we were successful in obtaining the map.
      if (norwayMap != null) {
        // new ConnectAsync().execute();
        setUpMap("Manolo" + " " + "Holsetgata street", "60.7967395", "11.0735713");
        hairdresserObjects oTest = new hairdresserObjects();
        oTest.setHairdresserName("headZUP");
        oTest.setAddress("Torggata 13");
        oTest.setSchedule("10-22");
        oTest.setEmail("empty");
        oTest.setPhone("62 52 99 88");
        oTest.sethType("Unisex");
        oTest.setFacebookPage("Empty");
        hObjectsList.add(oTest);
      }
    }
  }
  @Override
  public void onLocationChanged(Location location) {
    mLatitude = location.getLatitude();
    mLongitude = location.getLongitude();
    LatLng latLng = new LatLng(mLatitude, mLongitude);

    mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
    mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(12));
  }
Beispiel #16
0
  @Override
  public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;

    LatLng loc = new LatLng(coords.get(0), coords.get(1));
    System.out.println(coords.get(0) + "," + coords.get(1));
    mMap.addMarker(new MarkerOptions().position(loc).title(title.getText().toString()));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));
    mMap.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
  }
Beispiel #17
0
  private void setupMap() {
    @SuppressWarnings("unused")
    Marker resultPoint =
        map.addMarker(new MarkerOptions().position(_latLng).title("You are here!"));

    map.moveCamera(CameraUpdateFactory.newLatLngZoom(_latLng, 1));

    // Zoom in, animating the camera.
    map.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
    map.moveCamera(CameraUpdateFactory.newLatLngZoom(MUMBAI, 15));

    // Zoom in, animating the camera.
    map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
  }
Beispiel #19
0
 @Override
 public void onMapReady(GoogleMap map) {
   // On ajoute le marker de l'alert quand la map est dispo
   map.addMarker(
       new MarkerOptions()
           .position(this.currentAlert.getCoord())
           .title(this.currentAlert.getSender() + SPACE + getString(R.string.marker_text)));
   map.moveCamera(CameraUpdateFactory.newLatLng(this.currentAlert.getCoord()));
   map.moveCamera(CameraUpdateFactory.zoomTo(12));
 }
  private void setMyLocationOnMapWithZoom(Location location) {
    // Creating a LatLng object for the current location
    LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
    // Showing the current location in Google Map
    googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));

    // Zoom in the Google Map
    // Zoom in, animating the camera.
    googleMap.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
  }
Beispiel #21
0
 /**
  * This is where we can add markers or lines, add listeners or move the camera. In this case, we
  * just add a marker near Africa.
  *
  * <p>This should only be called once and when we are sure that {@link #mMap} is not null.
  */
 private void setUpMap() {
   mMap.addMarker(
       new MarkerOptions()
           .position(new LatLng(lat, lng))
           .title(title)
           .snippet(subTitle)
           .visible(true));
   CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(lat, lng));
   CameraUpdate zoom = CameraUpdateFactory.zoomTo(14);
   mMap.moveCamera(center);
   mMap.animateCamera(zoom);
 }
Beispiel #22
0
 @Override
 public void onLocationChanged(Location location) {
   // TODO Auto-generated method stub
   TextView locationTv = (TextView) findViewById(R.id.latlongLocation);
   double latitude = location.getLatitude();
   double longitude = location.getLongitude();
   LatLng latLng = new LatLng(latitude, longitude);
   googleMap.addMarker(new MarkerOptions().position(latLng));
   googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
   googleMap.animateCamera(CameraUpdateFactory.zoomTo(15));
   locationTv.setText("Latitude:" + latitude + ", Longitude:" + longitude);
 }
Beispiel #23
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_edit_crumb);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    // Register your receiver so that the Activity can be notified
    // when the JSON response came back
    IntentFilter filter = new IntentFilter(MyRequestReceiver6.PROCESS_RESPONSE);
    filter.addCategory(Intent.CATEGORY_DEFAULT);
    receiver = new MyRequestReceiver6();
    registerReceiver(receiver, filter);

    // get references to the EditText, TextView and toggle fields
    crumbName = (EditText) findViewById(R.id.editcrumb_name);
    crumbComment = (EditText) findViewById(R.id.editcrumb_description);
    crumbTags = (EditText) findViewById(R.id.editcrumb_tags);
    toggle = (ToggleButton) findViewById(R.id.toggleButton2);

    isPrivate = getIntent().getBooleanExtra(MyCrumbsActivity.CRUMB_PRIVATE, true);
    if (isPrivate) toggle.setChecked(true);
    else toggle.setChecked(false);

    // populate EditTexts and TextViews  fields with selected crumb attributes
    Intent intent3 = getIntent();
    crumbName.setText(intent3.getStringExtra(MyCrumbsActivity.CRUMB_NAME));
    crumbComment.setText(intent3.getStringExtra(MyCrumbsActivity.CRUMB_COMMENT));
    crumbTags.setText(intent3.getStringExtra(MyCrumbsActivity.CRUMB_TAGS));

    // get longitude and latitude of crumb to edit to mark on map fragment
    longitude = intent3.getDoubleExtra(MyCrumbsActivity.CRUMB_LONGITUDE, 0.0);
    latitude = intent3.getDoubleExtra(MyCrumbsActivity.CRUMB_LATITUDE, 0.0);

    // setup Google map to mark where crumb is
    SupportMapFragment supportMapFragment =
        (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    map = supportMapFragment.getMap();

    // get location of crumb, set to a LatLng object
    LatLng location = new LatLng(latitude, longitude);

    // mark crumb location on map
    map.setMyLocationEnabled(true);
    map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
    map.moveCamera(CameraUpdateFactory.newLatLng(location));
    map.animateCamera(CameraUpdateFactory.zoomTo(14));
    map.addMarker(
        new MarkerOptions()
            .position(location)
            .title(intent3.getStringExtra(MyCrumbsActivity.CRUMB_NAME)));
    CameraUpdate yourLocation = CameraUpdateFactory.newLatLngZoom(location, 12);
    map.animateCamera(yourLocation);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ride_details);

    Bundle extras = getIntent().getExtras();
    String carName = extras.getString("car");
    String pickUp = extras.getString("pickUp");
    final String dropPoint = extras.getString("drop");
    double lat = extras.getDouble("lat");
    double lon = extras.getDouble("lon");

    carView = (TextView) findViewById(R.id.carName);
    dropPointView = (TextView) findViewById(R.id.dropPointView);
    pickUpPlace = (TextView) findViewById(R.id.pickUpName);

    carView.setText(carName);
    dropPointView.setText(dropPoint);
    pickUpPlace.setText(pickUp);

    setUpMapIfNeeded();

    if (lat != 0 && lon != 0) {
      LatLng latlng = new LatLng(lat, lon);
      mMap.addMarker(new MarkerOptions().position(latlng).title(dropPoint));
      mMap.moveCamera(CameraUpdateFactory.newLatLng(latlng));
      mMap.animateCamera(CameraUpdateFactory.zoomTo(13));
    }

    rideButton = (Button) findViewById(R.id.ride);
    rideButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            SharedPreferences prefs = getSharedPreferences("BookMyRidePrefs", MODE_PRIVATE);
            if (prefs.contains("Phone")) {
              String number = prefs.getString("Phone", "");
              SmsManager sms = SmsManager.getDefault();
              sms.sendTextMessage(
                  number, null, "Ride confirmed. Drop point " + dropPoint, null, null);
              Toast.makeText(RideDetails.this, "SMS Sent to " + number, Toast.LENGTH_LONG).show();
            } else {
              Toast.makeText(
                      RideDetails.this,
                      "No phone number is saved. Please save a number by choosing Save PhoneNUmber menu option",
                      Toast.LENGTH_LONG)
                  .show();
            }
          }
        });
  }
 protected void onCameraChange(CameraPosition cameraPosition, ViewPortChangeListener listener) {
   // If custom tile overlay is enabled, use rounded zoom to avoid
   // tiles blurring
   if (customTileOverlay != null) {
     int roundZoom = Math.round(cameraPosition.zoom);
     if (Math.abs(cameraPosition.zoom - roundZoom) > 0.01) {
       CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(roundZoom);
       googleMap.animateCamera(cameraUpdate);
       return;
     }
   }
   GeoRect viewPort = getViewPortGeoRect();
   listener.onViewPortChanged(viewPort);
 }
  private void setMyLocationOnMapNoZoom(Location location) {
    // Getting latitude of the current location
    double latitude = location.getLatitude();

    // Getting longitude of the current location
    double longitude = location.getLongitude();

    // Creating a LatLng object for the current location
    LatLng latLng = new LatLng(latitude, longitude);

    // Showing the current location in Google Map
    googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
    googleMap.animateCamera(CameraUpdateFactory.zoomTo(8));
  }
Beispiel #27
0
  private void updateMap(double latitude, double longitude) {
    map.clear();
    LatLng position = new LatLng(latitude, longitude);

    CameraUpdate center = CameraUpdateFactory.newLatLng(position);
    CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);

    map.moveCamera(center);
    map.animateCamera(zoom);
    map.addMarker(
        new MarkerOptions()
            .position(position)
            .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)));
  }
Beispiel #28
0
  @Override
  public void onMapReady(GoogleMap googleMap) {
    final double latitude = LocationHelper.getLatitude(AppUtil.CONTEXT);
    final double longitude = LocationHelper.getLongitude(AppUtil.CONTEXT);
    LatLng myLocation = new LatLng(latitude, longitude);

    mMap = googleMap;
    mMap.setMyLocationEnabled(true);
    mMap.addMarker(new MarkerOptions().position(myLocation).title(MapsHelper.getMyLocation()));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(myLocation));
    mMap.animateCamera(CameraUpdateFactory.zoomTo(MapsHelper.getZoom()));

    MapsHelper.markMaps(mMap);
  }
  @Override
  public void onLocationChanged(Location location) {

    // You had this as int. It is advised to have Lat/Long as double.
    double lat = location.getLatitude();
    double lng = location.getLongitude();

    if (mapCenter == null
        && (venueLat == 0.0 || venueLat == null)
        && (venueLng == null || venueLng == 0.0)) {
      myLat = lat;
      myLng = lng;
      mapCenter = new LatLng(myLat, myLng);
      mMap.moveCamera(CameraUpdateFactory.newLatLng(mapCenter));
      mMap.animateCamera(CameraUpdateFactory.zoomTo(10));
    }
    if (mapCenter == null && venueLat != 0.0 && venueLng != 0.0) {
      myLat = lat;
      myLng = lng;
      mapCenter = midPoint(myLat, myLng, venueLat, venueLng);
      mMap.moveCamera(CameraUpdateFactory.newLatLng(mapCenter));
      mMap.animateCamera(CameraUpdateFactory.zoomTo(11));
    }
  }
  @Override
  public void onMapReady(GoogleMap googleMap) {
    map = googleMap;
    addHeatMap();

    CameraUpdate center =
        CameraUpdateFactory.newLatLng(
            new LatLng(
                GeoLocationService.getLastLocationLatitude(),
                GeoLocationService.getLastLocationLongitude()));
    CameraUpdate zoom = CameraUpdateFactory.zoomTo(12);

    googleMap.moveCamera(center);
    googleMap.animateCamera(zoom);
  }