Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Refresh the Google Map in my application using Swift?

I have made a tab bar application, in which one tab(MapTab) consist of an GoogleMap and in another one(ImageTab) all the images are saved. now, when the image get saved in ImageTab it get displayed on a MapTab in the form of Marker.

Now my question is, when i delete the image from ImageTab it gets deleted but how to remove it from MapTab i.e. GoogleMap.

like image 524
hussain Avatar asked Mar 11 '23 23:03

hussain


1 Answers

First clear the all the mapView's previous markers with:

mapView.clear()

And then refresh your image array. Now again draw the markers for the refreshed array of images.

like image 74
Harish Singh Avatar answered Apr 27 '23 20:04

Harish Singh