简体   繁体   中英

iOS GoogleMaps SDK crashes when removing polylines

I'm having this problem with GoogleMaps SDK for iOS v1.2 where the code crashes when I remove polylines.

In redrawPolylines I strip all polylines from a map and update with a new set. The section runs just fine but when GoogleMaps gets to the stage of redrawing the map it crashes somewhere within Google's own code

Leave out the bit where I remove the old polylines and no crashing

-(void) redrawPolylines
{

    for (GMSPolyline* polyline in self.mapView.polylines) {
        polyline.map=nil;
    }

    [self drawPolylines];
}

Anyone come up against this?

Google swiftly released 1.2.1 yesterday which fixes a crash with poly lines. I would try that first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM