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

Fix geojson missing updates with persistent layer after style change #1324

Merged
merged 2 commits into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Mapbox welcomes participation and contributions from everyone.
* OfflineRegion::getStatus() API added to get the completion status and the local size of the existing legacy offline regions. ([#1315](https://github.com/mapbox/mapbox-maps-android/pull/1315))

## Bug fixes 🐞
* Fix geojson missing updates with persistent layer after style change. ([#1324](https://github.com/mapbox/mapbox-maps-android/pull/1324))
* Fix render tasks being skipped when creating the map that could lead to missing tiles. ([#1304](https://github.com/mapbox/mapbox-maps-android/pull/1304))
* The legacy offline region observer instance is not unnecessarily retained inside the engine. [#1315](https://github.com/mapbox/mapbox-maps-android/pull/1315)
* Fix a bug of querying rendered feature for circle layer with map-pitch-alignment when the pitch is zero. [#1315](https://github.com/mapbox/mapbox-maps-android/pull/1315)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.mapbox.maps.MapboxStyleException
import com.mapbox.maps.extension.style.StyleContract
import com.mapbox.maps.extension.style.StyleInterface
import com.mapbox.maps.extension.style.layers.properties.PropertyValue
import com.mapbox.maps.extension.style.sources.generated.GeoJsonSource
import com.mapbox.maps.extension.style.utils.unwrap
import com.mapbox.maps.logE

Expand Down Expand Up @@ -93,14 +92,6 @@ abstract class Source(
private fun updateProperty(property: PropertyValue<*>, throwRuntimeException: Boolean = true) {
delegate?.let { styleDelegate ->
try {
// checking for validness makes sense only for geojson as it uses async parsing
if (this is GeoJsonSource) {
// explicitly reset native reference and return if map is not valid anymore
if (!styleDelegate.isValid()) {
delegate = null
return@let
}
}
val expected = styleDelegate.setStyleSourceProperty(
sourceId,
property.propertyName,
Expand Down
6 changes: 4 additions & 2 deletions sdk/src/main/java/com/mapbox/maps/Style.kt
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ class Style internal constructor(
* @return The value of \p property in the source with \p sourceId.
*/
override fun getStyleSourceProperty(sourceId: String, property: String): StylePropertyValue {
checkNativeStyle("getStyleSourceProperty")
// TODO see #1105 issue in internal repo
// checkNativeStyle("getStyleSourceProperty")
return styleManager.getStyleSourceProperty(sourceId, property)
}

Expand All @@ -697,7 +698,8 @@ class Style internal constructor(
property: String,
value: Value
): Expected<String, None> {
checkNativeStyle("setStyleSourceProperty")
// TODO see #1105 issue in internal repo
// checkNativeStyle("setStyleSourceProperty")
return styleManager.setStyleSourceProperty(sourceId, property, value)
}

Expand Down