Skip to content

Instantly share code, notes, and snippets.

@aclima93
Created July 10, 2018 17:06
Show Gist options
  • Save aclima93/2d627e06d3b2be86da803011c9b6e06a to your computer and use it in GitHub Desktop.
Save aclima93/2d627e06d3b2be86da803011c9b6e06a to your computer and use it in GitHub Desktop.
ARKit & CoreLocation + POI + AR Scene
func addPOIToARScene(_ poi: PointOfInterest) {
// create node
let location = CLLocation(latitude: poi.latitude, longitude: poi.longitude)
let text = poi.title
let annotationNode = LocationTextAnnotationNode(location: location, image: UIImage(named: "LocationMarker")!, text: text)
// add node to AR scene
sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: annotationNode)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment