@@ -303,14 +303,14 @@ public void onSnapshotReady(Bitmap bitmap) {
303
303
}
304
304
case "markers#update" :
305
305
{
306
+ invalidateMapIfNeeded ();
306
307
List <Object > markersToAdd = call .argument ("markersToAdd" );
307
308
markersController .addMarkers (markersToAdd );
308
309
List <Object > markersToChange = call .argument ("markersToChange" );
309
310
markersController .changeMarkers (markersToChange );
310
311
List <Object > markerIdsToRemove = call .argument ("markerIdsToRemove" );
311
312
markersController .removeMarkers (markerIdsToRemove );
312
313
result .success (null );
313
- invalidateMapIfNeeded ();
314
314
break ;
315
315
}
316
316
case "markers#showInfoWindow" :
@@ -333,38 +333,38 @@ public void onSnapshotReady(Bitmap bitmap) {
333
333
}
334
334
case "polygons#update" :
335
335
{
336
+ invalidateMapIfNeeded ();
336
337
List <Object > polygonsToAdd = call .argument ("polygonsToAdd" );
337
338
polygonsController .addPolygons (polygonsToAdd );
338
339
List <Object > polygonsToChange = call .argument ("polygonsToChange" );
339
340
polygonsController .changePolygons (polygonsToChange );
340
341
List <Object > polygonIdsToRemove = call .argument ("polygonIdsToRemove" );
341
342
polygonsController .removePolygons (polygonIdsToRemove );
342
343
result .success (null );
343
- invalidateMapIfNeeded ();
344
344
break ;
345
345
}
346
346
case "polylines#update" :
347
347
{
348
+ invalidateMapIfNeeded ();
348
349
List <Object > polylinesToAdd = call .argument ("polylinesToAdd" );
349
350
polylinesController .addPolylines (polylinesToAdd );
350
351
List <Object > polylinesToChange = call .argument ("polylinesToChange" );
351
352
polylinesController .changePolylines (polylinesToChange );
352
353
List <Object > polylineIdsToRemove = call .argument ("polylineIdsToRemove" );
353
354
polylinesController .removePolylines (polylineIdsToRemove );
354
355
result .success (null );
355
- invalidateMapIfNeeded ();
356
356
break ;
357
357
}
358
358
case "circles#update" :
359
359
{
360
+ invalidateMapIfNeeded ();
360
361
List <Object > circlesToAdd = call .argument ("circlesToAdd" );
361
362
circlesController .addCircles (circlesToAdd );
362
363
List <Object > circlesToChange = call .argument ("circlesToChange" );
363
364
circlesController .changeCircles (circlesToChange );
364
365
List <Object > circleIdsToRemove = call .argument ("circleIdsToRemove" );
365
366
circlesController .removeCircles (circleIdsToRemove );
366
367
result .success (null );
367
- invalidateMapIfNeeded ();
368
368
break ;
369
369
}
370
370
case "map#isCompassEnabled" :
@@ -437,6 +437,7 @@ public void onSnapshotReady(Bitmap bitmap) {
437
437
}
438
438
case "map#setStyle" :
439
439
{
440
+ invalidateMapIfNeeded ();
440
441
boolean mapStyleSet ;
441
442
if (call .arguments instanceof String ) {
442
443
String mapStyle = (String ) call .arguments ;
@@ -455,26 +456,25 @@ public void onSnapshotReady(Bitmap bitmap) {
455
456
"Unable to set the map style. Please check console logs for errors." );
456
457
}
457
458
result .success (mapStyleResult );
458
- invalidateMapIfNeeded ();
459
459
break ;
460
460
}
461
461
case "tileOverlays#update" :
462
462
{
463
+ invalidateMapIfNeeded ();
463
464
List <Map <String , ?>> tileOverlaysToAdd = call .argument ("tileOverlaysToAdd" );
464
465
tileOverlaysController .addTileOverlays (tileOverlaysToAdd );
465
466
List <Map <String , ?>> tileOverlaysToChange = call .argument ("tileOverlaysToChange" );
466
467
tileOverlaysController .changeTileOverlays (tileOverlaysToChange );
467
468
List <String > tileOverlaysToRemove = call .argument ("tileOverlayIdsToRemove" );
468
469
tileOverlaysController .removeTileOverlays (tileOverlaysToRemove );
469
470
result .success (null );
470
- invalidateMapIfNeeded ();
471
471
break ;
472
472
}
473
473
case "tileOverlays#clearTileCache" :
474
474
{
475
+ invalidateMapIfNeeded ();
475
476
String tileOverlayId = call .argument ("tileOverlayId" );
476
477
tileOverlaysController .clearTileCache (tileOverlayId );
477
- invalidateMapIfNeeded ();
478
478
result .success (null );
479
479
break ;
480
480
}
0 commit comments