Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MapboxARKit/Annotation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ public class Annotation: NSObject {
public var location: CLLocation
public var calloutImage: UIImage?
public var anchor: MBARAnchor?

public init(location: CLLocation, calloutImage: UIImage?) {
public var identifier: String
public init(location: CLLocation, calloutImage: UIImage?, identifier: String) {
self.location = location
self.calloutImage = calloutImage
self.identifier = identifier
}

}
1 change: 1 addition & 0 deletions MapboxARKit/AnnotationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ extension AnnotationManager: ARSCNViewDelegate {

if let calloutImage = annotation.calloutImage {
let calloutNode = createCalloutNode(with: calloutImage, node: newNode)
calloutNode.name = annotation.identifier
newNode.addChildNode(calloutNode)
}

Expand Down