As I continue to learn more about xAPI I’m discovering how flexible xAPI can be. This article is a three part series based on using Latitude and Longitude coordinates in xAPI.
The articles will cover why you would use geolocation and some applications for it’s use. It will also cover what you need to know to get started and finally developing a simple web app that will capture your location on a mobile device (or desktop) and save it to a Learning Record Store.
Part 2 – Building the Framework
Part 3 – Building and sending xAPI Statement
Why use latitude and longitude with xAPI?
The thought of using geoLocation with xAPI is something that has always played on my mind. I’m one that likes to learn by building something useful. At a State Council meeting with the Australia Institute of Training and Development (AITD) we were discussing how we could develop something that is engaging, uses new digital technologies and is COVID safe.
With the brain continually thinking in overtime, I soon realised that we could have a Treasure Hunt around Brisbane and have users ‘Checkin’ on an app and we could capture the location, may be even the save a photo as an attachment.
This is one application of how geolocation could be used. You could also use it for:
- Location based training
- Location tracking
- Emergency Incident Management / training
- Event management / reporting
- Student exam location check-in
- Location based software updates based on login
The skies (no pun intended 😉 ) is the limit on what you could use geolocation for, but the flexibility is with the xAPI.
Limitations and issues using latitude and longitude with xAPI
With any technology, there are limitations. xAPI is no exception. As we are using an app (of sorts be it web or app) we need to be allowed to use the location. If the location on the device is not approved, we won’t get the latitude and longitude.
During testing I also discovered the accuracy is not always correct. When accessing a location based website, aside from the permissions, the location is based on the network, not where you are.
Looking at the image below, both are using Google Maps. The one on the left is using Chrome on a Desktop, the one on the right is using Chrome on iOS (iPhone 11Pro Max). The desktop version has me in the Brisbane river!
What you’ll need to get started capturing latitude and longitude with xAPI
Before we dive into how we can use geolocation with xAPI, there’s a few things you will need. This and the following articles will be using a web app to simply get your current location and send an xAPI statement to a Learning Locker Store (LRS).
So, before we get started, make sure you have the following:
- Learning record Store (LRS). I use Learning Locker, but you could use Veracity, YetAnalytics, WaterShed, SCORM Cloud or any other LRS. There are plenty of free versions
- Understanding of JavaScript and HTML. You’ll need an Editor. You can use Notepad / TextEdit but have a look at Brackets, it’s free!
- xAPIWrapper Library. This is a JavaScript Library that makes it easier to send and retrieve xAPI Statements. This is not essential, but does make it easier
- Google Maps API key. You can use any Maps (like OpenStreetMaps) but we will use Google Maps
Now that you’ve made sure you have all the requirements, move onto Part 2 to start to put it all together.
8 Responses