Skip to content

Commit

Permalink
Bump gl-native to 10.4.0-beta.1, mapbox-common to v21.2.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Li committed Feb 18, 2022
1 parent d44ef66 commit 1d16eed
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 22 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,29 @@ mapView.location2.puckBearingEnabled = true
mapView.location2.puckBearingEnabled = false
```
* Add support for custom widgets rendered on top of the map. ([#1036](https://github.com/mapbox/mapbox-maps-android/pull/1036))
* Improve rendering performance by coalescing map updates when possible. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Add `StyleManager::hasStyleImage` API that checks whether an image is in the style or not. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Improve Snapshotter performance by using a lightweight scheduler instead of platform runloop. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Map now waits on sprite sheet loading before rendering. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Improve map rendering performance by avoiding calculations for all the non-transitional style layer paint properties. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Enable using of tile pack scheme from TileJSON. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Improve map rendering performance by decreasing de/allocations in map placement code. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Avoid style layer properties transition calculation when `TransitionOptions::duration` is set to 0. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Enable tile packs for DEM terrain tiles, it includes both Offline API and `TileStoreUsageMode::ReadAndUpdate` resource option. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Render tiles with partial content while the glyph dependencies are loading. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Canonicalize URLs and enable Offline API usage for the 3dtiles/v1 tiles. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))

## Bug fixes 🐞
* Fix skipping / crashing user events scheduled on a render thread with `MapView#queueEvent`. ([#1068](https://github.com/mapbox/mapbox-maps-android/pull/1068))
* Fix location puck not being shown if map is created without initial style (e.g. MapInitOptions.styleUri == null) and then loaded asynchronously. ([#1114](https://github.com/mapbox/mapbox-maps-android/pull/1114))
* Fix crash within location plugin that happens when style is reloaded simultaneously with location plugin updates. ([#1112](https://github.com/mapbox/mapbox-maps-android/pull/1112))
* Fix screen coordinate queries when using zero pitch and high zoom values. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Avoid possible crash at program exit caused by dummy tracer accessed after the destruction. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Fix crash for the case when a map event is handled by an Observer of a destructed map. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Fix shimmering artifact when pitched raster tiles with compressed textures are rendered. ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))

## Dependencies
* Bump gl-native to 10.4.0-beta.1, mapbox-common to v21.2.0-beta.1 ([#1160](https://github.com/mapbox/mapbox-maps-android/pull/1160))
* Update android gradle plugin to v7.0.4, gradle version to v7.0.2, Gradle licence plugin to 0.8.80, Kotlin gradle plugin to 1.5.31, Jacoco to 0.8.7. ([#1118](https://github.com/mapbox/mapbox-maps-android/pull/1118))

# 10.3.0 February 10, 2022
Expand Down
26 changes: 17 additions & 9 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens

Mapbox Maps Android uses portions of the Android Support Library compat.

URL: [https://developer.android.com/jetpack/androidx/releases/core#1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)
URL: [https://developer.android.com/jetpack/androidx/releases/core#1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

Expand All @@ -84,6 +84,14 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens

===========================================================================

Mapbox Maps Android uses portions of the Experimental annotation.

URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.1.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.1.0)

License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

===========================================================================

Mapbox Maps Android uses portions of the Gson.

License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
Expand Down Expand Up @@ -122,6 +130,14 @@ License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENS

===========================================================================

Mapbox Maps Android uses portions of the Kotlin Stdlib Jdk8.

URL: [https://kotlinlang.org/](https://kotlinlang.org/)

License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

===========================================================================

Mapbox Maps Android uses portions of the Mapbox Android Commmon OkHttp SDK.

URL: [https://github.com/mapbox/mapbox-sdk-common](https://github.com/mapbox/mapbox-sdk-common)
Expand Down Expand Up @@ -194,14 +210,6 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens

===========================================================================

Mapbox Maps Android uses portions of the org.jetbrains.kotlin:kotlin-stdlib-jdk8.

URL: [https://kotlinlang.org/](https://kotlinlang.org/)

License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

===========================================================================

Mapbox Maps Android uses portions of the VersionedParcelable.

URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html)
Expand Down
7 changes: 4 additions & 3 deletions android-auto-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ android {
}
}

if (buildFromSource.toBoolean()) {
packagingOptions {
pickFirst("**/libc++_shared.so")
packagingOptions {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
}
}

Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ android {
javaMaxHeapSize = "4g"
}

if (buildFromSource.toBoolean()) {
packagingOptions {
pickFirst("**/libc++_shared.so")
pickFirst("**/libmapbox-common.so")
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
}
}
}

dependencies {
implementation(project(":sdk"))
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 @@ -84,8 +84,8 @@ object Versions {
const val mapboxGestures = "0.7.0"
const val mapboxJavaServices = "5.4.1"
const val mapboxBase = "0.5.0"
const val mapboxGlNative = "10.3.2"
const val mapboxCommon = "21.1.0"
const val mapboxGlNative = "10.4.0-beta.1"
const val mapboxCommon = "21.2.0-beta.1"
const val mapboxAndroidCore = "5.0.0"
const val mapboxAndroidTelemetry = "8.1.0"
const val androidxCore = "1.3.1"
Expand Down
7 changes: 4 additions & 3 deletions extension-style-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ android {
}
}

if (buildFromSource.toBoolean()) {
packagingOptions {
pickFirst("**/libc++_shared.so")
packagingOptions {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
}
}

Expand Down
1 change: 1 addition & 0 deletions sdk/api/sdk.api
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ public final class com/mapbox/maps/Style : com/mapbox/maps/extension/style/Style
public fun getStyleTerrainProperty (Ljava/lang/String;)Lcom/mapbox/maps/StylePropertyValue;
public fun getStyleTransition ()Lcom/mapbox/maps/TransitionOptions;
public fun getStyleURI ()Ljava/lang/String;
public fun hasStyleImage (Ljava/lang/String;)Z
public fun invalidateStyleCustomGeometrySourceRegion (Ljava/lang/String;Lcom/mapbox/maps/CoordinateBounds;)Lcom/mapbox/bindgen/Expected;
public fun invalidateStyleCustomGeometrySourceTile (Ljava/lang/String;Lcom/mapbox/maps/CanonicalTileID;)Lcom/mapbox/bindgen/Expected;
public fun isStyleLayerPersistent (Ljava/lang/String;)Lcom/mapbox/bindgen/Expected;
Expand Down
4 changes: 3 additions & 1 deletion sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
}

packagingOptions {
jniLibs.pickFirsts.add("**/libmapbox-common.so")
}
sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
Expand Down
4 changes: 4 additions & 0 deletions sdk/src/main/java/com/mapbox/maps/NativeMapImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ internal class NativeMapImpl(private val map: MapInterface) :
return map.removeStyleImage(imageId)
}

override fun hasStyleImage(imageId: String): Boolean {
return map.hasStyleImage(imageId)
}

override fun queryRenderedFeatures(
shape: MutableList<ScreenCoordinate>,
options: RenderedQueryOptions,
Expand Down
11 changes: 11 additions & 0 deletions sdk/src/main/java/com/mapbox/maps/Style.kt
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,17 @@ class Style internal constructor(
override fun removeStyleImage(imageId: String): Expected<String, None> =
styleManagerRef.call { this.removeStyleImage(imageId) }

/**
* Checks whether an image exists.
*
* @param imageId The identifier of the image.
*
* @return True if image exists, false otherwise.
*/
override fun hasStyleImage(imageId: String): Boolean {
return styleManagerRef.call { this.hasStyleImage(imageId) }
}

/**
* Gets style layer properties.
*
Expand Down
7 changes: 7 additions & 0 deletions sdk/src/test/java/com/mapbox/maps/NativeMapTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ class NativeMapTest {
verify { map.removeStyleImage("foo") }
}

@Test
fun hasStyleImage() {
val nativeMap = NativeMapImpl(map)
nativeMap.hasStyleImage("foo")
verify { map.hasStyleImage("foo") }
}

@Test
fun addStyleCustomGeometrySource() {
val value = mockk<CustomGeometrySourceOptions>()
Expand Down
6 changes: 6 additions & 0 deletions sdk/src/test/java/com/mapbox/maps/StyleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class StyleTest {
verify { nativeMap.removeStyleImage("id") }
}

@Test
fun hasImage() {
style.hasStyleImage("id")
verify { nativeMap.hasStyleImage("id") }
}

@Test
fun addBitmap() {
val bitmap: Bitmap = mockk(relaxed = true)
Expand Down

0 comments on commit 1d16eed

Please sign in to comment.