Remove particular GMSMarker from GMSMapview using Google Map sdk in ios

后端 未结 9 3033
-上瘾入骨i
-上瘾入骨i 2021-02-19 23:18

I am integrating google maps sdk. Its all work fine. But how to remove particular Marker(Pin Point) when second will appear.(I am not using Mapkit)

I want the following:

9条回答
  •  天命终不由人
    2021-02-20 00:00

    To remove a particular pin from GMSMapView keep reference of pin (if there are multiple then use array) then use this code

    currLocMarker.map  = nil;
    

    To remove all things including pins poly lines from GMSMapView use this code

    [ _mapView clear];
    

提交回复
热议问题