Skip to content
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
6 changes: 5 additions & 1 deletion android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,11 @@ class GoogleMapProvider(private val context: Context) :

private fun processPendingMarkers() {
if (googleMap == null) return
pendingMarkerViews.forEach { addMarkerViewToMap(it) }
pendingMarkerViews.forEach {
// markerViewDidLayout adds it once the bitmap can be drawn
if (it.hasCustomView && !it.didLayout) return@forEach
addMarkerViewToMap(it)
}
pendingMarkerViews.clear()
}

Expand Down
5 changes: 5 additions & 0 deletions ios/core/GoogleMapProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,11 @@ - (void)addMarkerViewToMap:(LuggMarkerView *)markerView {
if (!_mapView)
return;

// Custom icons rasterize from layout; adding before that shows the SDK's
// default pin until markerViewDidLayout re-syncs.
if (markerView.hasCustomView && !markerView.didLayout)
return;

GMSAdvancedMarker *marker = [[GMSAdvancedMarker alloc] init];
marker.position = markerView.coordinate;
marker.title = markerView.title.length > 0 ? markerView.title : nil;
Expand Down
Loading