pozar
This commit is contained in:
parent
66dba76ed4
commit
6bd3300768
@ -10,7 +10,7 @@ android {
|
||||
applicationId "com.uam.wmi.findmytutor"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 27
|
||||
versionCode 3
|
||||
versionCode 4
|
||||
versionName "0.9.0-alpha"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
@ -139,7 +139,9 @@ public class MapActivity extends BaseActivity
|
||||
String id = markerUserHash.get(marker.getId());
|
||||
String locationLevel = PrefUtils.getLocationLevel(getApplicationContext());
|
||||
|
||||
if (id.equals(myId) && (locationLevel.equals(SharingLevel.MANUAL.toString()) || locationLevel.equals(SharingLevel.PREDEFINED.toString()))) {
|
||||
// if (id.equals(myId) && (locationLevel.equals(SharingLevel.MANUAL.toString()) || locationLevel.equals(SharingLevel.PREDEFINED.toString()))) {
|
||||
Log.e(tag + "ididid", id + "+++" + myId);
|
||||
if (id.equals(myId)) {
|
||||
selectLocationButton.setVisibility(View.GONE);
|
||||
removeLocationButton.setVisibility(View.VISIBLE);
|
||||
|
||||
@ -254,11 +256,19 @@ public class MapActivity extends BaseActivity
|
||||
|
||||
if (tmpLocalMarker == null) {
|
||||
|
||||
tmpLocalMarker = mapboxMap.addMarker(new MarkerOptions()
|
||||
.position(latLng)
|
||||
.icon(icon)
|
||||
.title("My Loc")
|
||||
.setSnippet("Snipecik"));
|
||||
Icon defaultIcon = getMapIcon(SharingLevel.MANUAL.toString(), myId);
|
||||
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.setIcon(defaultIcon)
|
||||
.position(latLng);
|
||||
|
||||
|
||||
tmpLocalMarker = mapboxMap.addMarker(markerOptions);
|
||||
MapMarker marker = new MapMarker(tmpLocalMarker, markerOptions, defaultIcon, SharingLevel.MANUAL.toString());
|
||||
|
||||
markerHash.put(myId, marker);
|
||||
updateUserHashMap(myId, marker.getMarker().getId());
|
||||
|
||||
|
||||
} else {
|
||||
ValueAnimator markerAnimator = ObjectAnimator.ofObject(tmpLocalMarker, "position",
|
||||
@ -272,33 +282,15 @@ public class MapActivity extends BaseActivity
|
||||
// Toast instructing user to tap on the mapboxMap
|
||||
// TODO PUT MANUAL CORD
|
||||
try {
|
||||
// droppedMarkercoordinate = new Coordinate(
|
||||
// latLng.getLatitude(),
|
||||
// latLng.getLongitude(),
|
||||
// latLng.getAltitude(),
|
||||
// "approx",
|
||||
// PrefUtils.getUserFirstName(getApplicationContext()) + " " + PrefUtils.getUserLastName(getApplicationContext()),
|
||||
// PrefUtils.getUserId(getApplicationContext()),
|
||||
// PrefUtils.getLocationLevel(getApplicationContext())
|
||||
// );
|
||||
manualLocationUtils.showLocationDialog("Name the location", latLng);
|
||||
// manualLocationUtils.showLocationDialog("Name the location", latLng);
|
||||
Log.e(tag, "asdasdasd");
|
||||
PrefUtils.putManualLocation(this,latLng);
|
||||
handleBackgroundTaskLifeCycle();
|
||||
|
||||
} catch (IllegalArgumentException e) {
|
||||
Timber.e(String.valueOf(e));
|
||||
}
|
||||
|
||||
// Toast.makeText(
|
||||
// MapActivity.this,
|
||||
// "Manual Locations selected!" + latLng,
|
||||
// Toast.LENGTH_LONG
|
||||
// ).show();
|
||||
// LayoutInflater layoutInflaterAndroid = LayoutInflater.from(MapActivity.this);
|
||||
// View dialogView = layoutInflaterAndroid.inflate(R.layout.feedback_modal, null);
|
||||
// AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(MapActivity.this );
|
||||
// alertDialogBuilderUserInput.setView(dialogView).setPositiveButton("dupa", null);
|
||||
// final AlertDialog alertDialog = alertDialogBuilderUserInput.create();
|
||||
// alertDialog.show();
|
||||
selectLocationButton.setVisibility(View.GONE);
|
||||
mapboxMap.removeMarker(tmpLocalMarker);
|
||||
tmpLocalMarker = null;
|
||||
|
@ -68,6 +68,7 @@ public class ManualLocationUtils {
|
||||
PrefUtils.putManualLocation(activityContext, latLng);
|
||||
sendLocation(body,latLng);
|
||||
alertDialog.dismiss();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user