@rnmapbox/maps 10.0.11-rc.2 → 10.0.11
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.
package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt
CHANGED
|
@@ -22,6 +22,7 @@ import com.mapbox.geojson.Point
|
|
|
22
22
|
import com.mapbox.maps.*
|
|
23
23
|
import com.mapbox.maps.extension.localization.localizeLabels
|
|
24
24
|
import com.mapbox.maps.extension.observable.eventdata.MapLoadingErrorEventData
|
|
25
|
+
import com.mapbox.maps.extension.observable.eventdata.RenderFrameFinishedEventData
|
|
25
26
|
import com.mapbox.maps.extension.observable.getMapLoadingErrorEventData
|
|
26
27
|
import com.mapbox.maps.extension.style.expressions.generated.Expression
|
|
27
28
|
import com.mapbox.maps.extension.style.layers.Layer
|
|
@@ -275,6 +276,16 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
|
|
|
275
276
|
style.setProjection(Projection(mProjection))
|
|
276
277
|
}
|
|
277
278
|
|
|
279
|
+
private fun setupEvents() {
|
|
280
|
+
mMap?.addOnRenderFrameFinishedListener(
|
|
281
|
+
object: OnRenderFrameFinishedListener {
|
|
282
|
+
override fun onRenderFrameFinished(eventData: RenderFrameFinishedEventData) {
|
|
283
|
+
handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_FRAME_FULLY)
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
278
289
|
private fun onMapReady(map: MapboxMap) {
|
|
279
290
|
map.getStyle(object : Style.OnStyleLoaded {
|
|
280
291
|
override fun onStyleLoaded(style: Style) {
|
|
@@ -1131,6 +1142,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
|
|
|
1131
1142
|
RCTMGLMarkerViewManager.markerViewContainerSizeFixer(this, mapView.viewAnnotationManager)
|
|
1132
1143
|
|
|
1133
1144
|
this.addOnLayoutChangeListener(this)
|
|
1145
|
+
this.setupEvents()
|
|
1134
1146
|
}
|
|
1135
1147
|
|
|
1136
1148
|
// region Ornaments
|