Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The path is not removing from maps in ios side #42

Open
DurankGts opened this issue Nov 12, 2021 · 2 comments
Open

The path is not removing from maps in ios side #42

DurankGts opened this issue Nov 12, 2021 · 2 comments
Assignees

Comments

@DurankGts
Copy link

please check way the path objet is not removing in ios side

mc.removeMapObject(moCurrPath);

@DurankGts
Copy link
Author

any support about this issue. This problem was tested in ios 15.5 iphone 13 and this method is not working...

@DurankGts
Copy link
Author

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;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants