Radar View like LOVOO [closed]

Deadly 提交于 2019-12-30 00:04:44

问题


Hi I am developing a location based iOS application. In which there is a feature to find user's friends in a radar view. I am getting friends latitude and longitude from backend. Now I tried so many thing to show them in a radar view like a compass (means when I rotate the friend's spots in radar also rotates)

Client need feature exactly like the app LOVOO

How can I do this ? Please help me.


回答1:


If you are not worried about the curvature of the earth's surface then this turns into something really easy.

You change all of the latitude and longitudes into a polar coordinate based system (angle and magnitude from your own latitude and longitude). Then you get the device's compass bearing. Then you adjust all of the "friend's" angles based off your device's angle. Then plot everything out on your map (translating your polar coordinates back to cartesian). Then update whenever the device's compass bearing changes (or friend's location updates).

It's a lot of math, but the process is pretty straight forward and you should be able to get all of the conversion information with a single google search.




回答2:


I've created a similar LOVOO like Radar view for iOS. It's available on github.

https://github.com/abm-adnan/Radar




回答3:


In case you also require the live camera image and augmentations on top of that, you can use Wikitude SDK, which includes a customizable radar widget (see the example here). You can use it also without the camera image, however the library could be too much for your case.



来源:https://stackoverflow.com/questions/21385075/radar-view-like-lovoo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!