Search in sources :

Example 6 with CameraUpdate

use of com.google.android.gms.maps.CameraUpdate in project cw-omnibus by commonsguy.

the class MainActivity method onMapReady.

@Override
public void onMapReady(GoogleMap map) {
    if (needsInit) {
        CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044, -73.98180484771729));
        CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
        map.moveCamera(center);
        map.animateCamera(zoom);
    }
    addMarker(map, 40.748963847316034, -73.96807193756104, R.string.un, R.string.united_nations);
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet);
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3);
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 7 with CameraUpdate

use of com.google.android.gms.maps.CameraUpdate in project cw-omnibus by commonsguy.

the class MainActivity method onMapReady.

@Override
public void onMapReady(final GoogleMap map) {
    if (needsInit) {
        CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044, -73.98180484771729));
        CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
        map.moveCamera(center);
        map.animateCamera(zoom);
    }
    addMarker(map, 40.748963847316034, -73.96807193756104, R.string.un, R.string.united_nations);
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet);
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3);
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy);
    map.setInfoWindowAdapter(new PopupAdapter(getLayoutInflater()));
    map.setOnInfoWindowClickListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 8 with CameraUpdate

use of com.google.android.gms.maps.CameraUpdate in project cw-omnibus by commonsguy.

the class MainActivity method onMapReady.

@Override
public void onMapReady(final GoogleMap map) {
    if (needsInit) {
        CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044, -73.98180484771729));
        CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
        map.moveCamera(center);
        map.animateCamera(zoom);
    }
    addMarker(map, 40.748963847316034, -73.96807193756104, R.string.un, R.string.united_nations, 45);
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet, 135);
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3, 225);
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy, 315);
    map.setInfoWindowAdapter(new PopupAdapter(getLayoutInflater()));
    map.setOnInfoWindowClickListener(this);
    map.setOnMarkerClickListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 9 with CameraUpdate

use of com.google.android.gms.maps.CameraUpdate in project cw-omnibus by commonsguy.

the class MainActivity method onMapReady.

@Override
public void onMapReady(GoogleMap map) {
    CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044, -73.98180484771729));
    CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
    map.moveCamera(center);
    map.animateCamera(zoom);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 10 with CameraUpdate

use of com.google.android.gms.maps.CameraUpdate in project cw-omnibus by commonsguy.

the class MainActivity method onMapReady.

@SuppressWarnings("MissingPermission")
@Override
public void onMapReady(final GoogleMap map) {
    if (needsInit) {
        CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044, -73.98180484771729));
        CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
        map.moveCamera(center);
        map.animateCamera(zoom);
    }
    addMarker(map, 40.748963847316034, -73.96807193756104, R.string.un, R.string.united_nations);
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet);
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3);
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy);
    map.setInfoWindowAdapter(new PopupAdapter(getLayoutInflater()));
    map.setOnInfoWindowClickListener(this);
    map.setMyLocationEnabled(true);
    map.setOnMyLocationChangeListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Aggregations

CameraUpdate (com.google.android.gms.maps.CameraUpdate)20 LatLng (com.google.android.gms.maps.model.LatLng)18 View (android.view.View)2 Intent (android.content.Intent)1 IntentSender (android.content.IntentSender)1 LocationManager (android.location.LocationManager)1 OnClickListener (android.view.View.OnClickListener)1 AdapterView (android.widget.AdapterView)1 OnItemClickListener (android.widget.AdapterView.OnItemClickListener)1 PendingResult (com.google.android.gms.common.api.PendingResult)1 ResultCallback (com.google.android.gms.common.api.ResultCallback)1 Status (com.google.android.gms.common.api.Status)1 LocationRequest (com.google.android.gms.location.LocationRequest)1 LocationSettingsResult (com.google.android.gms.location.LocationSettingsResult)1 LocationSettingsStates (com.google.android.gms.location.LocationSettingsStates)1 PolygonOptions (com.google.android.gms.maps.model.PolygonOptions)1 PolylineOptions (com.google.android.gms.maps.model.PolylineOptions)1 ListReportCommentActivity (com.ushahidi.android.app.ui.phone.ListReportCommentActivity)1 ViewReportNewsActivity (com.ushahidi.android.app.ui.phone.ViewReportNewsActivity)1 ViewReportPhotoActivity (com.ushahidi.android.app.ui.phone.ViewReportPhotoActivity)1