Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
package com.google.maps.android.ktx.utils;
|
||||
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.maps.android.PolyUtil;
|
||||
import com.google.maps.android.SphericalUtil;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: compiled from: LatLng.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000\"\n\u0000\n\u0002\u0010\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\u0010 \n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0002\b\r\u001a\r\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u0086\n\u001a\r\u0010\u0003\u001a\u00020\u0001*\u00020\u0002H\u0086\n\u001a\u001f\u0010\u0004\u001a\u0004\u0018\u00010\u0002*\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00012\u0006\u0010\u0006\u001a\u00020\u0001H\u0086\b\u001a#\u0010\u0007\u001a\u00020\b*\b\u0012\u0004\u0012\u00020\u00020\t2\u0006\u0010\n\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\bH\u0086\b\u001a\u0013\u0010\f\u001a\u00020\b*\b\u0012\u0004\u0012\u00020\u00020\tH\u0086\b\u001a-\u0010\r\u001a\u00020\b*\b\u0012\u0004\u0012\u00020\u00020\t2\u0006\u0010\n\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\b2\b\b\u0002\u0010\u000e\u001a\u00020\u0001H\u0086\b\u001a-\u0010\u000f\u001a\u00020\b*\b\u0012\u0004\u0012\u00020\u00020\t2\u0006\u0010\n\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\b2\b\b\u0002\u0010\u000e\u001a\u00020\u0001H\u0086\b\u001a\u0013\u0010\u0010\u001a\u00020\u0011*\b\u0012\u0004\u0012\u00020\u00020\tH\u0086\b\u001a!\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00020\t*\b\u0012\u0004\u0012\u00020\u00020\t2\u0006\u0010\u000e\u001a\u00020\u0001H\u0086\b\u001a\u0015\u0010\u0013\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0014\u001a\u00020\u0002H\u0086\b\u001a\u0015\u0010\u0015\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0016\u001a\u00020\u0002H\u0086\b\u001a\u0013\u0010\u0017\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00020\tH\u0086\b\u001a\u0013\u0010\u0018\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00020\tH\u0086\b\u001a\u0013\u0010\u0019\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00020\tH\u0086\b\u001a\u0013\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\u00020\t*\u00020\u0011H\u0086\b\u001a\u001d\u0010\u001b\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u0014\u001a\u00020\u00022\u0006\u0010\u001c\u001a\u00020\u0001H\u0086\b\u001a\u001d\u0010\u001d\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00012\u0006\u0010\u0006\u001a\u00020\u0001H\u0086\b¨\u0006\u001e"}, d2 = {"component1", "", "Lcom/google/android/gms/maps/model/LatLng;", "component2", "computeSphericalOffsetOrigin", "distance", "heading", "containsLocation", "", "", "latLng", "geodesic", "isClosedPolygon", "isLocationOnPath", "tolerance", "isOnEdge", "latLngListEncode", "", "simplify", "sphericalDistance", "to", "sphericalHeading", "toLatLng", "sphericalPathLength", "sphericalPolygonArea", "sphericalPolygonSignedArea", "toLatLngList", "withSphericalLinearInterpolation", "fraction", "withSphericalOffset", "maps-utils-ktx_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
public final class LatLngKt {
|
||||
public static final double component1(LatLng latLng) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
return latLng.latitude;
|
||||
}
|
||||
|
||||
public static final double component2(LatLng latLng) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
return latLng.longitude;
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean isLocationOnPath$default(List list, LatLng latLng, boolean z, double d, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
d = 0.1d;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
Intrinsics.checkNotNullParameter(latLng, "latLng");
|
||||
return PolyUtil.isLocationOnPath(latLng, list, z, d);
|
||||
}
|
||||
|
||||
public static final boolean isLocationOnPath(List<LatLng> list, LatLng latLng, boolean z, double d) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
Intrinsics.checkNotNullParameter(latLng, "latLng");
|
||||
return PolyUtil.isLocationOnPath(latLng, list, z, d);
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean isOnEdge$default(List list, LatLng latLng, boolean z, double d, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
d = 0.1d;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
Intrinsics.checkNotNullParameter(latLng, "latLng");
|
||||
return PolyUtil.isLocationOnEdge(latLng, list, z, d);
|
||||
}
|
||||
|
||||
public static final boolean isOnEdge(List<LatLng> list, LatLng latLng, boolean z, double d) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
Intrinsics.checkNotNullParameter(latLng, "latLng");
|
||||
return PolyUtil.isLocationOnEdge(latLng, list, z, d);
|
||||
}
|
||||
|
||||
public static final boolean containsLocation(List<LatLng> list, LatLng latLng, boolean z) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
Intrinsics.checkNotNullParameter(latLng, "latLng");
|
||||
return PolyUtil.containsLocation(latLng, list, z);
|
||||
}
|
||||
|
||||
public static final List<LatLng> simplify(List<LatLng> list, double d) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
List<LatLng> listSimplify = PolyUtil.simplify(list, d);
|
||||
Intrinsics.checkNotNullExpressionValue(listSimplify, "simplify(this, tolerance)");
|
||||
return listSimplify;
|
||||
}
|
||||
|
||||
public static final List<LatLng> toLatLngList(String str) {
|
||||
Intrinsics.checkNotNullParameter(str, "<this>");
|
||||
List<LatLng> listDecode = PolyUtil.decode(str);
|
||||
Intrinsics.checkNotNullExpressionValue(listDecode, "decode(this)");
|
||||
return listDecode;
|
||||
}
|
||||
|
||||
public static final String latLngListEncode(List<LatLng> list) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
String strEncode = PolyUtil.encode(list);
|
||||
Intrinsics.checkNotNullExpressionValue(strEncode, "encode(this)");
|
||||
return strEncode;
|
||||
}
|
||||
|
||||
public static final boolean isClosedPolygon(List<LatLng> list) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
return PolyUtil.isClosedPolygon(list);
|
||||
}
|
||||
|
||||
public static final double sphericalPathLength(List<LatLng> list) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
return SphericalUtil.computeLength(list);
|
||||
}
|
||||
|
||||
public static final double sphericalPolygonArea(List<LatLng> list) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
return SphericalUtil.computeArea(list);
|
||||
}
|
||||
|
||||
public static final double sphericalPolygonSignedArea(List<LatLng> list) {
|
||||
Intrinsics.checkNotNullParameter(list, "<this>");
|
||||
return SphericalUtil.computeSignedArea(list);
|
||||
}
|
||||
|
||||
public static final double sphericalHeading(LatLng latLng, LatLng toLatLng) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
Intrinsics.checkNotNullParameter(toLatLng, "toLatLng");
|
||||
return SphericalUtil.computeHeading(latLng, toLatLng);
|
||||
}
|
||||
|
||||
public static final LatLng withSphericalOffset(LatLng latLng, double d, double d2) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
LatLng latLngComputeOffset = SphericalUtil.computeOffset(latLng, d, d2);
|
||||
Intrinsics.checkNotNullExpressionValue(latLngComputeOffset, "computeOffset(this, distance, heading)");
|
||||
return latLngComputeOffset;
|
||||
}
|
||||
|
||||
public static final LatLng computeSphericalOffsetOrigin(LatLng latLng, double d, double d2) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
return SphericalUtil.computeOffsetOrigin(latLng, d, d2);
|
||||
}
|
||||
|
||||
public static final LatLng withSphericalLinearInterpolation(LatLng latLng, LatLng to, double d) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
Intrinsics.checkNotNullParameter(to, "to");
|
||||
LatLng latLngInterpolate = SphericalUtil.interpolate(latLng, to, d);
|
||||
Intrinsics.checkNotNullExpressionValue(latLngInterpolate, "interpolate(this, to, fraction)");
|
||||
return latLngInterpolate;
|
||||
}
|
||||
|
||||
public static final double sphericalDistance(LatLng latLng, LatLng to) {
|
||||
Intrinsics.checkNotNullParameter(latLng, "<this>");
|
||||
Intrinsics.checkNotNullParameter(to, "to");
|
||||
return SphericalUtil.computeDistanceBetween(latLng, to);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user