DanijelHuis / HDAugmentedReality

Augmented Reality component for iOS, written in Swift.
MIT License
480 stars 97 forks source link

Placing Marker Relative to Altitude #7

Closed jvigneshcs closed 8 years ago

jvigneshcs commented 8 years ago

How can we place a marker relative to altitude (if available)? This is not an issue, just a request to add new feature

DanijelHuis commented 8 years ago

HDAugmentedReality uses vertical axis for distance, meaning POIs that are further will be higher. I don't think I can incorporate altitude into this to look intuitive enough.

jvigneshcs commented 8 years ago

Thanks for your response. In my case I need to place the Marker on top of the mentioned altitude and I found this link which has mentioned such capability and I'm working on integrating that in my code base

DanijelHuis commented 8 years ago

This was designed for dense city areas, where there are many POIs. In that case, annotations on the screen overlap and user cannot see anything.

It was solved so that if two annotations are overlapping, the further one is pushed higher, this is done until none of the annotations are overlapping anymore.

If you don't need this functionality and you still want to use this library, you could override ARViewController.yPositionForAnnotationView and calculate your own vertical position for each annotation.

Maybe in the future I could make so user can choose which method of positioning he wants - altitude or distance. We'll see.

Anyway, Good luck with your project.

jvigneshcs commented 8 years ago

Thanks for your valuable response. I'm working on updating the yPositionForAnnotationView as you mentioned. Option based on altitude or distance for positioning is a good thing, will try to contribute my changes if it works.

jacogasp commented 7 years ago

Take a look at this https://github.com/DanijelHuis/HDAugmentedReality/issues/18#issuecomment-272621585