Question

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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top