Update MapLibre Java (Turf and GeoJSON) (#2237)

This commit is contained in:
Bart Louwers
2024-04-05 15:22:39 +02:00
committed by GitHub
parent 9ae5fb3001
commit b0fe79a174
72 changed files with 190 additions and 190 deletions

View File

@@ -10,7 +10,7 @@ namespace geojson {
class Feature {
public:
static constexpr auto Name() { return "com/mapbox/geojson/Feature"; };
static constexpr auto Name() { return "org/maplibre/geojson/Feature"; };
static mbgl::GeoJSONFeature convert(jni::JNIEnv&, const jni::Object<Feature>&);
static jni::Local<jni::Array<jni::Object<Feature>>> convert(jni::JNIEnv&, const std::vector<mbgl::Feature>&);

View File

@@ -12,7 +12,7 @@ namespace geojson {
class FeatureCollection {
public:
static constexpr auto Name() { return "com/mapbox/geojson/FeatureCollection"; };
static constexpr auto Name() { return "org/maplibre/geojson/FeatureCollection"; };
static mbgl::FeatureCollection convert(jni::JNIEnv&, const jni::Object<FeatureCollection>&);

View File

@@ -12,7 +12,7 @@ namespace geojson {
class Geometry {
public:
static constexpr auto Name() { return "com/mapbox/geojson/Geometry"; };
static constexpr auto Name() { return "org/maplibre/geojson/Geometry"; };
static jni::Local<jni::Object<Geometry>> New(jni::JNIEnv&, mbgl::Geometry<double>);

View File

@@ -11,7 +11,7 @@ namespace geojson {
class GeometryCollection {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/GeometryCollection"; };
static constexpr auto Name() { return "org/maplibre/geojson/GeometryCollection"; };
static constexpr auto Type() { return "GeometryCollection"; };
static jni::Local<jni::Object<GeometryCollection>> New(jni::JNIEnv&,

View File

@@ -16,7 +16,7 @@ namespace geojson {
class LineString {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/LineString"; };
static constexpr auto Name() { return "org/maplibre/geojson/LineString"; };
static constexpr auto Type() { return "LineString"; };
static jni::Local<jni::Object<LineString>> New(jni::JNIEnv&, const mbgl::LineString<double>&);

View File

@@ -15,7 +15,7 @@ namespace geojson {
class MultiLineString {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/MultiLineString"; };
static constexpr auto Name() { return "org/maplibre/geojson/MultiLineString"; };
static constexpr auto Type() { return "MultiLineString"; };
static jni::Local<jni::Object<MultiLineString>> New(jni::JNIEnv&, const mbgl::MultiLineString<double>&);

View File

@@ -16,7 +16,7 @@ namespace geojson {
class MultiPoint {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/MultiPoint"; };
static constexpr auto Name() { return "org/maplibre/geojson/MultiPoint"; };
static constexpr auto Type() { return "MultiPoint"; };
static jni::Local<jni::Object<MultiPoint>> New(jni::JNIEnv&, const mbgl::MultiPoint<double>&);

View File

@@ -15,7 +15,7 @@ namespace geojson {
class MultiPolygon {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/MultiPolygon"; };
static constexpr auto Name() { return "org/maplibre/geojson/MultiPolygon"; };
static constexpr auto Type() { return "MultiPolygon"; };
static jni::Local<jni::Object<MultiPolygon>> New(jni::JNIEnv&, const mbgl::MultiPolygon<double>&);

View File

@@ -13,7 +13,7 @@ namespace geojson {
class Point {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/Point"; };
static constexpr auto Name() { return "org/maplibre/geojson/Point"; };
static constexpr auto Type() { return "Point"; };
static jni::Local<jni::Object<Point>> New(jni::JNIEnv&, const mbgl::Point<double>&);

View File

@@ -15,7 +15,7 @@ namespace geojson {
class Polygon {
public:
using SuperTag = Geometry;
static constexpr auto Name() { return "com/mapbox/geojson/Polygon"; };
static constexpr auto Name() { return "org/maplibre/geojson/Polygon"; };
static constexpr auto Type() { return "Polygon"; };
static jni::Local<jni::Object<Polygon>> New(jni::JNIEnv &, const mbgl::Polygon<double> &);

View File

@@ -5,10 +5,10 @@ import android.os.Parcel
import android.os.Parcelable
import androidx.annotation.FloatRange
import androidx.annotation.Keep
import com.mapbox.geojson.Point
import org.maplibre.geojson.Point
import org.maplibre.android.constants.GeometryConstants
import com.mapbox.turf.TurfConstants
import com.mapbox.turf.TurfMeasurement
import org.maplibre.turf.TurfConstants
import org.maplibre.turf.TurfMeasurement
import kotlin.math.abs
/**

View File

@@ -3,8 +3,8 @@ package org.maplibre.android.location;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Point;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.Point;
class LayerFeatureProvider {

View File

@@ -2,7 +2,7 @@ package org.maplibre.android.location;
import androidx.annotation.NonNull;
import com.mapbox.geojson.Feature;
import org.maplibre.geojson.Feature;
import org.maplibre.android.style.expressions.Expression;
import org.maplibre.android.style.layers.CircleLayer;

View File

@@ -6,7 +6,7 @@ import android.graphics.PointF;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.mapbox.geojson.Feature;
import org.maplibre.geojson.Feature;
import org.maplibre.android.location.modes.RenderMode;
import org.maplibre.android.log.Logger;
import org.maplibre.android.maps.MapLibreMap;

View File

@@ -46,8 +46,8 @@ import androidx.annotation.Nullable;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Point;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.Point;
import org.maplibre.android.geometry.LatLng;
import org.maplibre.android.location.modes.RenderMode;

View File

@@ -20,8 +20,8 @@ import com.mapbox.android.gestures.MoveGestureDetector;
import com.mapbox.android.gestures.RotateGestureDetector;
import com.mapbox.android.gestures.ShoveGestureDetector;
import com.mapbox.android.gestures.StandardScaleGestureDetector;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Geometry;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.Geometry;
import org.maplibre.android.MapStrictMode;
import org.maplibre.android.annotations.Annotation;
import org.maplibre.android.annotations.BaseMarkerOptions;

View File

@@ -8,8 +8,8 @@ import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Geometry;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.Geometry;
import org.maplibre.android.annotations.Marker;
import org.maplibre.android.annotations.Polygon;
import org.maplibre.android.annotations.Polyline;

View File

@@ -12,8 +12,8 @@ import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Geometry;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.Geometry;
import org.maplibre.android.LibraryLoader;
import org.maplibre.android.MapStrictMode;
import org.maplibre.android.annotations.Icon;

View File

@@ -5,7 +5,7 @@ import android.graphics.PointF;
import androidx.annotation.FloatRange;
import androidx.annotation.NonNull;
import com.mapbox.geojson.Point;
import org.maplibre.geojson.Point;
import org.maplibre.android.constants.GeometryConstants;
import org.maplibre.android.geometry.LatLng;
import org.maplibre.android.geometry.LatLngBounds;

View File

@@ -3,9 +3,9 @@ package org.maplibre.android.offline
import android.os.Parcel
import android.os.Parcelable
import androidx.annotation.Keep
import com.mapbox.geojson.Feature
import com.mapbox.geojson.Geometry
import com.mapbox.turf.TurfMeasurement
import org.maplibre.geojson.Feature
import org.maplibre.geojson.Geometry
import org.maplibre.turf.TurfMeasurement
import org.maplibre.android.geometry.LatLngBounds
import org.maplibre.android.geometry.LatLngBounds.Companion.from

View File

@@ -13,9 +13,9 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.mapbox.geojson.GeoJson;
import com.mapbox.geojson.Polygon;
import com.mapbox.geojson.gson.GeometryGeoJson;
import org.maplibre.geojson.GeoJson;
import org.maplibre.geojson.Polygon;
import org.maplibre.geojson.gson.GeometryGeoJson;
import org.maplibre.android.style.layers.PropertyFactory;
import org.maplibre.android.style.layers.PropertyValue;

View File

@@ -3,8 +3,8 @@ package org.maplibre.android.style.sources
import androidx.annotation.Keep
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
import com.mapbox.geojson.Feature
import com.mapbox.geojson.FeatureCollection
import org.maplibre.geojson.Feature
import org.maplibre.geojson.FeatureCollection
import org.maplibre.android.geometry.LatLngBounds
import org.maplibre.android.geometry.LatLngBounds.Companion.from
import org.maplibre.android.style.expressions.Expression

View File

@@ -2,9 +2,9 @@ package org.maplibre.android.style.sources
import androidx.annotation.Keep
import androidx.annotation.UiThread
import com.mapbox.geojson.Feature
import com.mapbox.geojson.FeatureCollection
import com.mapbox.geojson.Geometry
import org.maplibre.geojson.Feature
import org.maplibre.geojson.FeatureCollection
import org.maplibre.geojson.Geometry
import org.maplibre.android.style.expressions.Expression
import java.net.URI
import java.net.URL

View File

@@ -1,7 +1,7 @@
package org.maplibre.android.style.sources
import androidx.annotation.WorkerThread
import com.mapbox.geojson.FeatureCollection
import org.maplibre.geojson.FeatureCollection
import org.maplibre.android.geometry.LatLngBounds
/**

View File

@@ -4,7 +4,7 @@ import android.net.Uri
import androidx.annotation.Keep
import androidx.annotation.Size
import androidx.annotation.UiThread
import com.mapbox.geojson.Feature
import org.maplibre.geojson.Feature
import org.maplibre.android.style.expressions.Expression
import java.net.URL
import java.util.*

View File

@@ -2,7 +2,7 @@ package org.maplibre.android.location
import android.graphics.Bitmap
import com.google.gson.JsonElement
import com.mapbox.geojson.Feature
import org.maplibre.geojson.Feature
import org.maplibre.android.geometry.LatLng
import org.maplibre.android.location.MapLibreAnimator.AnimationsValueChangeListener
import org.maplibre.android.location.modes.RenderMode

View File

@@ -1,8 +1,8 @@
package com.mapbox.mapboxsdk.style.expressions
import android.graphics.Color
import com.mapbox.geojson.Point
import com.mapbox.geojson.Polygon
import org.maplibre.geojson.Point
import org.maplibre.geojson.Polygon
import org.maplibre.android.style.expressions.Expression.FormatOption
import org.maplibre.android.style.layers.PropertyFactory
import org.maplibre.android.style.layers.PropertyValue