AR based on Location
You probably have pinpointed your favorite locations on your map. But, have you ever tried to pinpoint these locations on your camera? What do I mean? This image shows everything, actually better than my words 😀 This article is based on Nicolo’s work and experiment. If you want to read details about his implementation, you can refer to his webpage.
We want to use the Camera and the GPS on the smartphone. By default, browsers don’t allow to use of these sensors on HTTP websites. So, you need to enable your localhost to use HTTPS or deploy your application to a web server on a cloud environment like AWS, Heroku, or anything you might like to use. But, if you want to use your localhost and don’t know how to enable HTTPS, please read this article: Enable HTTPS for Local Web Server
If you successfully enable the HTTPS on your pc and can connect to your pc via your mobile phone, so you can easily use this code snippet to create an HTML file and enjoy AR based on GPS locations. Keep in mind that you can change the latitude and longitude to your favorite GPS point or you can add more elements with different locations. As you move the camera you can see the floating points in your view. Access the shortcode from Here.
Also, if you would like to know more details about this library and want to play with its features, I recommend the documentation page.