Adds tapOnLabelForMarker:onMap:onLayer: method to RMMapViewDelegate protocol. #161

Merged
merged 1 commit into from Feb 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

dguerri commented Jan 27, 2012

Adds tapOnLabelForMarker:onMap:onLayer: method to RMMapViewDelegate protocol.

This method allows the implementation of tappable buttons in markers label.

For instance, you can add a button layer with name @"NameOfYourButtonLayerHere" to a marker label and implement the method tapOnLabelForMarker:onMap:onLayer: for your RMMapViewDelegate as follows:

  • (void) tapOnLabelForMarker:(RMMarker_)marker
    onMap:(RMMapView_)map
    onLayer:(CALayer *)layer
    {
    if (layer.name == @"NameOfYourButtonLayerHere") {
    //Code to serve button tap here
    }
    }

See also http://stackoverflow.com/questions/5967909/route-me-marker-label-with-uibuttontypedetaildisclosure-button-button-isnt-cl

@dguerri dguerri Adds tapOnLabelForMarker:onMap:onLayer: method to RMMapViewDelegate p…
…rotocol.

This method allows the implementation of tappable buttons in markers label.

For instance, you can add a button layer with name @"NameOfYourButtonLayerHere" to a marker label and implement the method tapOnLabelForMarker:onMap:onLayer: for your RMMapViewDelegate as follows:

- (void) tapOnLabelForMarker:(RMMarker*)marker
                       onMap:(RMMapView*)map
                       onLayer:(CALayer *)layer
{
    if (layer.name == @"NameOfYourButtonLayerHere") {
		//Code to serve button tap here
    }
}

See also http://stackoverflow.com/questions/5967909/route-me-marker-label-with-uibuttontypedetaildisclosure-button-button-isnt-cl
8dc7517
Contributor

dguerri commented Jan 27, 2012

I forgot code formatting...

- (void) tapOnLabelForMarker:(RMMarker*)marker
                       onMap:(RMMapView*)map
                       onLayer:(CALayer *)layer
{
    if (layer.name == @"NameOfYourButtonLayerHere") {
            //Code to serve button tap here
    }
}

michaeltyson merged commit e42ae37 into route-me:master Feb 21, 2012

@jklimke jklimke pushed a commit to jklimke/mapbox-ios-sdk that referenced this pull request Feb 10, 2013

@incanus incanus fixes #161: cross-link existing file cache info 2fed4a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment