@rnmapbox/maps 10.1.16 → 10.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -147,7 +147,9 @@ open class RNMBXMapViewManager(context: ReactApplicationContext, val viewTagReso
|
|
|
147
147
|
@ReactProp(name = "surfaceView")
|
|
148
148
|
override fun setSurfaceView(mapView: RNMBXMapView, value: Dynamic) {
|
|
149
149
|
if (mapView.isInitialized) {
|
|
150
|
-
|
|
150
|
+
if (mapView.surfaceView != value.asBoolean()) {
|
|
151
|
+
Logger.d(LOG_TAG, "surafaceView cannot be changed on existing map")
|
|
152
|
+
}
|
|
151
153
|
} else {
|
|
152
154
|
mapView.surfaceView = value.asBoolean()
|
|
153
155
|
}
|
|
@@ -37,7 +37,6 @@ abstract class RNMBXLayer<T : Layer?>(protected var mContext: Context) : Abstrac
|
|
|
37
37
|
protected var mFilter: Expression? = null
|
|
38
38
|
@JvmField
|
|
39
39
|
protected var mMap: MapboxMap? = null
|
|
40
|
-
@JvmField
|
|
41
40
|
protected var mLayer: T? = null
|
|
42
41
|
protected var mHadFilter = false
|
|
43
42
|
|
|
@@ -109,8 +108,8 @@ abstract class RNMBXLayer<T : Layer?>(protected var mContext: Context) : Abstrac
|
|
|
109
108
|
|
|
110
109
|
fun setMaxZoomLevel(maxZoomLevel: Double) {
|
|
111
110
|
mMaxZoomLevel = maxZoomLevel
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
mLayer?.let {
|
|
112
|
+
it.maxZoom(maxZoomLevel.toFloat().toDouble())
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
|
|
@@ -163,7 +162,7 @@ abstract class RNMBXLayer<T : Layer?>(protected var mContext: Context) : Abstrac
|
|
|
163
162
|
} */
|
|
164
163
|
|
|
165
164
|
Logger.logged("RNMBXLayer.add") {
|
|
166
|
-
style!!.addLayer(mLayer!!)
|
|
165
|
+
style!!.addLayer(mLayer!!)
|
|
167
166
|
mMapView!!.layerAdded(mLayer!!)
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -310,6 +309,7 @@ abstract class RNMBXLayer<T : Layer?>(protected var mContext: Context) : Abstrac
|
|
|
310
309
|
val layer = mLayer
|
|
311
310
|
if (layer != null) {
|
|
312
311
|
it.removeStyleLayer(layer.layerId)
|
|
312
|
+
mLayer = null // see https://github.com/rnmapbox/maps/pull/3392
|
|
313
313
|
} else {
|
|
314
314
|
Logger.e("RNMBXLayer","mLayer is null on removal layer from map")
|
|
315
315
|
}
|