Skip to content

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

Description

@DurankGts

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

mc.removeMapObject(moCurrPath);

Activity

  1. DurankGts commented on Jun 4, 2022

    @DurankGts
    Author

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

  2. DurankGts commented on Oct 24, 2022

    @DurankGts
    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions