mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 19:07:17 +01:00
107 lines
5.5 KiB
Java
107 lines
5.5 KiB
Java
package com.mapbox.maps.plugin.annotation;
|
|
|
|
import androidx.exifinterface.media.ExifInterface;
|
|
import com.google.gson.JsonElement;
|
|
import com.google.gson.JsonObject;
|
|
import com.mapbox.android.gestures.MoveDistancesObject;
|
|
import com.mapbox.geojson.Geometry;
|
|
import com.mapbox.maps.plugin.delegates.MapCameraManagerDelegate;
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\b&\u0018\u0000 )*\b\b\u0000\u0010\u0001*\u00020\u00022\u00020\u0003:\u0001)B\u001d\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00028\u0000¢\u0006\u0002\u0010\tJ\n\u0010\u001a\u001a\u0004\u0018\u00010\u001bH\u0016J\u0006\u0010\u001c\u001a\u00020\u0007J\u001f\u0010\u001d\u001a\u0004\u0018\u00018\u00002\u0006\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020!H&¢\u0006\u0002\u0010\"J\b\u0010#\u001a\u00020$H&J\u0012\u0010%\u001a\u00020&2\b\u0010'\u001a\u0004\u0018\u00010\u001bH\u0016J\b\u0010(\u001a\u00020&H&R\u001c\u0010\b\u001a\u00028\u0000X\u0086\u000e¢\u0006\u0010\n\u0002\u0010\u000e\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u001a\u0010\u0011\u001a\u00020\u0012X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u001a\u0010\u0016\u001a\u00020\u0012X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0016\u0010\u0013\"\u0004\b\u0017\u0010\u0015R\u0014\u0010\u0006\u001a\u00020\u0007X\u0084\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0019¨\u0006*"}, d2 = {"Lcom/mapbox/maps/plugin/annotation/Annotation;", ExifInterface.GPS_DIRECTION_TRUE, "Lcom/mapbox/geojson/Geometry;", "", "id", "", "jsonObject", "Lcom/google/gson/JsonObject;", "geometry", "(Ljava/lang/String;Lcom/google/gson/JsonObject;Lcom/mapbox/geojson/Geometry;)V", "getGeometry", "()Lcom/mapbox/geojson/Geometry;", "setGeometry", "(Lcom/mapbox/geojson/Geometry;)V", "Lcom/mapbox/geojson/Geometry;", "getId", "()Ljava/lang/String;", "isDraggable", "", "()Z", "setDraggable", "(Z)V", "isSelected", "setSelected", "getJsonObject", "()Lcom/google/gson/JsonObject;", "getData", "Lcom/google/gson/JsonElement;", "getJsonObjectCopy", "getOffsetGeometry", "mapCameraManagerDelegate", "Lcom/mapbox/maps/plugin/delegates/MapCameraManagerDelegate;", "moveDistancesObject", "Lcom/mapbox/android/gestures/MoveDistancesObject;", "(Lcom/mapbox/maps/plugin/delegates/MapCameraManagerDelegate;Lcom/mapbox/android/gestures/MoveDistancesObject;)Lcom/mapbox/geojson/Geometry;", "getType", "Lcom/mapbox/maps/plugin/annotation/AnnotationType;", "setData", "", "jsonElement", "setUsedDataDrivenProperties", "Companion", "sdk-base_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
|
/* loaded from: classes9.dex */
|
|
public abstract class Annotation<T extends Geometry> {
|
|
|
|
@NotNull
|
|
private static final String FEATURE_IDENTIFIER_PREFIX = "mapbox_annotation_";
|
|
|
|
@NotNull
|
|
public static final String ID_DATA = "custom_data";
|
|
public static final double MAX_MERCATOR_LATITUDE = 85.05112877980659d;
|
|
public static final double MIN_MERCATOR_LATITUDE = -85.05112877980659d;
|
|
|
|
@NotNull
|
|
private T geometry;
|
|
|
|
@NotNull
|
|
private final String id;
|
|
private boolean isDraggable;
|
|
private boolean isSelected;
|
|
|
|
@NotNull
|
|
private final JsonObject jsonObject;
|
|
|
|
public Annotation(@NotNull String str, @NotNull JsonObject jsonObject, @NotNull T t) {
|
|
str.getClass();
|
|
jsonObject.getClass();
|
|
t.getClass();
|
|
this.id = str;
|
|
this.jsonObject = jsonObject;
|
|
this.geometry = t;
|
|
}
|
|
|
|
@Nullable
|
|
public JsonElement getData() {
|
|
return this.jsonObject.get(ID_DATA);
|
|
}
|
|
|
|
@NotNull
|
|
public final T getGeometry() {
|
|
return this.geometry;
|
|
}
|
|
|
|
@NotNull
|
|
public final String getId() {
|
|
return this.id;
|
|
}
|
|
|
|
@NotNull
|
|
public final JsonObject getJsonObject() {
|
|
return this.jsonObject;
|
|
}
|
|
|
|
@NotNull
|
|
public final JsonObject getJsonObjectCopy() {
|
|
JsonObject deepCopy = this.jsonObject.deepCopy();
|
|
deepCopy.getClass();
|
|
return deepCopy;
|
|
}
|
|
|
|
@Nullable
|
|
public abstract T getOffsetGeometry(@NotNull MapCameraManagerDelegate mapCameraManagerDelegate, @NotNull MoveDistancesObject moveDistancesObject);
|
|
|
|
@NotNull
|
|
public abstract AnnotationType getType();
|
|
|
|
/* renamed from: isDraggable, reason: from getter */
|
|
public final boolean getIsDraggable() {
|
|
return this.isDraggable;
|
|
}
|
|
|
|
/* renamed from: isSelected, reason: from getter */
|
|
public final boolean getIsSelected() {
|
|
return this.isSelected;
|
|
}
|
|
|
|
public void setData(@Nullable JsonElement jsonElement) {
|
|
this.jsonObject.add(ID_DATA, jsonElement);
|
|
}
|
|
|
|
public final void setDraggable(boolean z) {
|
|
this.isDraggable = z;
|
|
}
|
|
|
|
public final void setGeometry(@NotNull T t) {
|
|
t.getClass();
|
|
this.geometry = t;
|
|
}
|
|
|
|
public final void setSelected(boolean z) {
|
|
this.isSelected = z;
|
|
}
|
|
|
|
public abstract void setUsedDataDrivenProperties();
|
|
}
|