Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump GL Native to 10.11.0-beta.1 and Common to 23.3.0-beta.1 #1934

Merged
merged 5 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,24 @@ Mapbox welcomes participation and contributions from everyone.
* Skip redundant `MapboxMap.setCamera` updates in `CameraAnimationsPlugin`. ([1909](https://github.com/mapbox/mapbox-maps-android/pull/1909))
* Improve performance by setting geojson data directly. ([1920](https://github.com/mapbox/mapbox-maps-android/pull/1920))
* Fix viewport hang when transition to `FollowPuckViewportState` and no new location update is available. ([1929](https://github.com/mapbox/mapbox-maps-android/pull/1929))
* Optimize shadow rendering memory use and performance. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Enable the usage of expressions in array values during style parsing, where the member expressions in the array is evaluated to the same type. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Slightly improve quality and performance of the terrain. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))

## Bug fixes 🐞
* Fix crash due to invalid distance when panning the map. ([1906](https://github.com/mapbox/mapbox-maps-android/pull/1906))
* Fix asset file source threading model. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fix terrain elevation when a padded dem source is used. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fix distance-to-center filtering of symbols when terrain is enabled. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fix camera bumpiness at the beginning of a drag operation when terrain is enabled. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fix disappearing tiles when terrain with a high exaggeration is enabled. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Mitigate symbol flickering on source data change during camera animation. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fixes rare crashes during render feature queries, if the features are located close to each other. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))
* Fix redundant snapshot capturing that caused excessive memory usage. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))

## Dependencies
* Update gl-native to v10.11.0-beta.1 and common to v23.3.0-beta.1. ([1934](https://github.com/mapbox/mapbox-maps-android/pull/1934))


# 10.10.0 December 07, 2022
## Features ✨ and improvements 🏁
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ object Versions {
const val mapboxGestures = "0.8.0"
const val mapboxJavaServices = "5.4.1"
const val mapboxBase = "0.8.0"
const val mapboxGlNative = "10.10.0"
const val mapboxCommon = "23.2.1"
const val mapboxGlNative = "10.11.0-beta.1"
const val mapboxCommon = "23.3.0-beta.1"
const val androidxCore = "1.7.0" // last version compatible with kotlin 1.5.31
const val androidxFragmentTesting = "1.5.0"
const val androidxAnnotation = "1.1.0"
Expand Down
4 changes: 4 additions & 0 deletions sdk/api/metalava.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ package com.mapbox.maps {
method public com.mapbox.maps.StylePropertyValue getStyleLayerProperty(String layerId, String property);
method public java.util.List<com.mapbox.maps.StyleObjectInfo> getStyleLayers();
method public com.mapbox.maps.StylePropertyValue getStyleLightProperty(String property);
method @com.mapbox.maps.MapboxExperimental public com.mapbox.maps.StylePropertyValue getStyleLightProperty(String id, String property);
method @com.mapbox.maps.MapboxExperimental public java.util.List<com.mapbox.maps.StyleObjectInfo> getStyleLights();
method public com.mapbox.maps.StylePropertyValue getStyleProjectionProperty(String property);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.Value> getStyleSourceProperties(String sourceId);
method public com.mapbox.maps.StylePropertyValue getStyleSourceProperty(String sourceId, String property);
Expand Down Expand Up @@ -405,6 +407,8 @@ package com.mapbox.maps {
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleLayerProperty(String layerId, String property, com.mapbox.bindgen.Value value);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleLight(com.mapbox.bindgen.Value parameters);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleLightProperty(String id, com.mapbox.bindgen.Value light);
method @com.mapbox.maps.MapboxExperimental public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleLightProperty(String id, String property, com.mapbox.bindgen.Value value);
method @com.mapbox.maps.MapboxExperimental public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleLights(com.mapbox.bindgen.Value lights);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleProjection(com.mapbox.bindgen.Value properties);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleProjectionProperty(String property, com.mapbox.bindgen.Value value);
method public com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> setStyleSourceProperties(String sourceId, com.mapbox.bindgen.Value properties);
Expand Down
4 changes: 4 additions & 0 deletions sdk/api/sdk.api
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ public final class com/mapbox/maps/Style : com/mapbox/maps/extension/style/Style
public fun getStyleLayerProperty (Ljava/lang/String;Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
public fun getStyleLayers ()Ljava/util/List;
public fun getStyleLightProperty (Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
public fun getStyleLightProperty (Ljava/lang/String;Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
public fun getStyleLights ()Ljava/util/List;
public fun getStyleProjectionProperty (Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
public fun getStyleSourceProperties (Ljava/lang/String;)Lcom/mapbox/bindgen/Expected;
public fun getStyleSourceProperty (Ljava/lang/String;Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
Expand Down Expand Up @@ -438,6 +440,8 @@ public final class com/mapbox/maps/Style : com/mapbox/maps/extension/style/Style
public fun setStyleLayerProperty (Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleLight (Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleLightProperty (Ljava/lang/String;Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleLightProperty (Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleLights (Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleProjection (Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleProjectionProperty (Ljava/lang/String;Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
public fun setStyleSourceProperties (Ljava/lang/String;Lcom/mapbox/bindgen/Value;)Lcom/mapbox/bindgen/Expected;
Expand Down
21 changes: 20 additions & 1 deletion sdk/src/main/java/com/mapbox/maps/NativeMapImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.mapbox.common.Cancelable
import com.mapbox.geojson.Feature
import com.mapbox.geojson.Geometry
import com.mapbox.geojson.Point
import java.util.*

internal class NativeMapImpl(val map: MapInterface) :
MapInterface, StyleManagerInterface, ObservableInterface {
Expand Down Expand Up @@ -380,6 +379,22 @@ internal class NativeMapImpl(val map: MapInterface) :
return map.setStyleLightProperty(property, value)
}

override fun setStyleLightProperty(
id: String,
property: String,
value: Value
): Expected<String, None> {
return map.setStyleLightProperty(id, property, value)
}

override fun getStyleLights(): MutableList<StyleObjectInfo> {
return map.styleLights
}

override fun setStyleLights(lights: Value): Expected<String, None> {
return map.setStyleLights(lights)
}

override fun setStyleAtmosphere(properties: Value): Expected<String, None> {
return map.setStyleAtmosphere(properties)
}
Expand All @@ -396,6 +411,10 @@ internal class NativeMapImpl(val map: MapInterface) :
return map.getStyleLightProperty(property)
}

override fun getStyleLightProperty(id: String, property: String): StylePropertyValue {
return map.getStyleLightProperty(id, property)
}

override fun getStyleImage(imageId: String): Image? {
return map.getStyleImage(imageId)
}
Expand Down
37 changes: 37 additions & 0 deletions sdk/src/main/java/com/mapbox/maps/Style.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mapbox.maps
import android.graphics.Bitmap
import androidx.annotation.WorkerThread
import com.mapbox.bindgen.Expected
import com.mapbox.bindgen.ExpectedFactory
import com.mapbox.bindgen.None
import com.mapbox.bindgen.Value
import com.mapbox.geojson.Feature
Expand Down Expand Up @@ -381,6 +382,34 @@ class Style internal constructor(
return styleManager.setStyleLightProperty(id, light)
}

/**
* NO-OP
*/
@MapboxExperimental
override fun setStyleLightProperty(
id: String,
property: String,
value: Value
): Expected<String, None> {
return ExpectedFactory.createNone()
}

/**
* NO-OP
*/
@MapboxExperimental
override fun getStyleLights(): MutableList<StyleObjectInfo> {
return ArrayList(0)
}

/**
* NO-OP
*/
@MapboxExperimental
override fun setStyleLights(lights: Value): Expected<String, None> {
return ExpectedFactory.createNone()
}

/**
* Sets the style global [atmosphere](https://docs.mapbox.com/mapbox-gl-js/style-spec/fog/) properties.
*
Expand Down Expand Up @@ -506,6 +535,14 @@ class Style internal constructor(
return styleManager.getStyleLightProperty(property)
}

/**
* NO-OP
*/
@MapboxExperimental
override fun getStyleLightProperty(id: String, property: String): StylePropertyValue {
return StylePropertyValue(Value.nullValue(), StylePropertyValueKind.UNDEFINED)
}

/**
* Adds an image to be used in the style. This API can also be used for updating
* an image. If the image id was already added, it gets replaced by the new image.
Expand Down