Search in sources :

Example 1 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) {
    this.map = 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.setOnCameraMoveStartedListener(this);
    map.setOnCameraMoveListener(this);
    map.setOnCameraMoveCanceledListener(this);
    map.setOnCameraIdleListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 2 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);
    map.setOnMarkerDragListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 3 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, false, 180);
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet, false, 0);
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3, true, 90);
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy, true, 270);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 4 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, "UN_HQ.jpg");
    addMarker(map, 40.76866299974387, -73.98268461227417, R.string.lincoln_center, R.string.lincoln_center_snippet, "Avery_Fisher_Hall.jpg");
    addMarker(map, 40.765136435316755, -73.97989511489868, R.string.carnegie_hall, R.string.practice_x3, "Carnegie_Hall.jpg");
    addMarker(map, 40.70686417491799, -74.01572942733765, R.string.downtown_club, R.string.heisman_trophy, null);
    map.setInfoWindowAdapter(new PopupAdapter(this, getLayoutInflater(), images));
    map.setOnInfoWindowClickListener(this);
}
Also used : LatLng(com.google.android.gms.maps.model.LatLng) CameraUpdate(com.google.android.gms.maps.CameraUpdate)

Example 5 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) {
    this.map = 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);
    markerToAnimate = addMarker(map, LINCOLN_CENTER.latitude, LINCOLN_CENTER.longitude, 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)

Aggregations

CameraUpdate (com.google.android.gms.maps.CameraUpdate)19 LatLng (com.google.android.gms.maps.model.LatLng)17 Intent (android.content.Intent)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 AdapterView (android.widget.AdapterView)1 OnItemClickListener (android.widget.AdapterView.OnItemClickListener)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 ViewReportVideoActivity (com.ushahidi.android.app.ui.phone.ViewReportVideoActivity)1 ViewReportView (com.ushahidi.android.app.views.ViewReportView)1