use of net.osmand.data.FavouritePoint.SpecialPointType in project Osmand by osmandapp.
the class FavouritesHelper method setParkingPoint.
public void setParkingPoint(@NonNull LatLon latLon, @Nullable String address, long pickupTimestamp, boolean addToCalendar) {
SpecialPointType specialType = SpecialPointType.PARKING;
FavouritePoint point = getSpecialPoint(specialType);
if (point != null) {
point.setIconId(specialType.getIconId(app));
point.setTimestamp(pickupTimestamp);
point.setCalendarEvent(addToCalendar);
editFavourite(point, latLon.getLatitude(), latLon.getLongitude(), address);
lookupAddress(point);
} else {
point = new FavouritePoint(latLon.getLatitude(), latLon.getLongitude(), specialType.getName(), specialType.getCategory());
point.setAddress(address);
point.setCreationDate(System.currentTimeMillis());
point.setTimestamp(pickupTimestamp);
point.setCalendarEvent(addToCalendar);
point.setIconId(specialType.getIconId(app));
addFavourite(point);
}
}
Aggregations