how to hide only markers in route me

96 views Asked by At

i want to show /hide markers on route me map initialised for osm. but using command [marker manager hideAllMarkers]; hides not only markers on map but also routes or anything added to marker manager.How to hide only markers and keep other things in marker manager intact.

1

There are 1 answers

0
Tanuj Jagoori On BEST ANSWER

well solved it by adding two methods in RMMarker class

-(void)showMarker{
    [self setHidden:NO];
 }

-(void)hideMarker{
    [self setHidden:YES];
}

And finally iterate through marker manager
NSArray* markers = markerManager.markers;

        for(RMMarker *mk in markers)
        {
            if ([mk isKindOfClass:[RMMarker class]]&&[mk.accessibilityLabel isEqual:@"xyz"])
            {
                [mk showMarker];
            }
        }

similarly u can do the same for RMPath class