Open DurankGts opened 3 years ago
any support about this issue. This problem was tested in ios 15.5 iphone 13 and this method is not working...
the solution to this code is this:
your actually code in GoogleMaps libs in maven
com_codename1_googlemaps_InternalNativeMapsImpl.m
-(long long)finishPath:(long long)param{ __block GMSPolyline polyline = nil; int color = pathStrokeColor; int width = pathStrokeWidth; dispatch_async(dispatch_get_main_queue(), ^{ GMSMutablePath path = (GMSMutablePath*)param; polyline = [GMSPolyline polylineWithPath:path]; [path release]; polyline.strokeColor = UIColorFromRGB(color, 255); polyline.strokeWidth = width; polyline.map = mapView; }); return path; }
i just change async to sync
-(long long) finishPath : (long long) param { __block GMSPolyline *polyline = nil; int color = pathStrokeColor; int width = pathStrokeWidth;
dispatch_sync(dispatch_get_main_queue(), ^{
GMSMutablePath *path = (GMSMutablePath*) param;
polyline = [GMSPolyline polylineWithPath : path];
[path release];
polyline.strokeColor = UIColorFromRGB(color, 255);
polyline.strokeWidth = width;
polyline.map = mapView;
});
return polyline;
}
please check way the path objet is not removing in ios side
mc.removeMapObject(moCurrPath);