react-native-google-maps-plus 1.8.2 → 1.8.4-dev.1
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.
|
@@ -17,6 +17,7 @@ import com.google.android.gms.maps.CameraUpdateFactory
|
|
|
17
17
|
import com.google.android.gms.maps.GoogleMap
|
|
18
18
|
import com.google.android.gms.maps.GoogleMapOptions
|
|
19
19
|
import com.google.android.gms.maps.MapView
|
|
20
|
+
import com.google.android.gms.maps.MapsInitializer
|
|
20
21
|
import com.google.android.gms.maps.model.CameraPosition
|
|
21
22
|
import com.google.android.gms.maps.model.Circle
|
|
22
23
|
import com.google.android.gms.maps.model.CircleOptions
|
|
@@ -105,6 +106,7 @@ class GoogleMapsViewImpl(
|
|
|
105
106
|
private var cameraMoveReason = -1
|
|
106
107
|
|
|
107
108
|
init {
|
|
109
|
+
MapsInitializer.initialize(reactContext)
|
|
108
110
|
reactContext.addLifecycleEventListener(this)
|
|
109
111
|
}
|
|
110
112
|
|
|
@@ -265,19 +265,32 @@ class MapMarkerBuilder(
|
|
|
265
265
|
try {
|
|
266
266
|
ensureActive()
|
|
267
267
|
val bmp = renderBitmap(m)
|
|
268
|
-
|
|
268
|
+
|
|
269
|
+
if (bmp == null) {
|
|
270
|
+
withContext(Dispatchers.Main) { onReady(null) }
|
|
271
|
+
return@launch
|
|
272
|
+
}
|
|
273
|
+
ensureActive()
|
|
274
|
+
val desc = BitmapDescriptorFactory.fromBitmap(bmp)
|
|
275
|
+
|
|
276
|
+
iconCache.put(key, desc)
|
|
277
|
+
bmp.recycle()
|
|
278
|
+
|
|
279
|
+
withContext(Dispatchers.Main) {
|
|
269
280
|
ensureActive()
|
|
270
|
-
|
|
271
|
-
iconCache.put(key, desc)
|
|
272
|
-
bmp.recycle()
|
|
273
|
-
withContext(Dispatchers.Main) {
|
|
274
|
-
ensureActive()
|
|
275
|
-
onReady(desc)
|
|
276
|
-
}
|
|
281
|
+
onReady(desc)
|
|
277
282
|
}
|
|
278
283
|
} catch (_: OutOfMemoryError) {
|
|
279
284
|
iconCache.evictAll()
|
|
285
|
+
withContext(Dispatchers.Main) {
|
|
286
|
+
ensureActive()
|
|
287
|
+
onReady(null)
|
|
288
|
+
}
|
|
280
289
|
} catch (_: Throwable) {
|
|
290
|
+
withContext(Dispatchers.Main) {
|
|
291
|
+
ensureActive()
|
|
292
|
+
onReady(null)
|
|
293
|
+
}
|
|
281
294
|
} finally {
|
|
282
295
|
jobsById.remove(m.id)
|
|
283
296
|
}
|
package/package.json
CHANGED