To add a Location Sensor to your app:
- 1.Navigate to the Blocks tab of your project.
- 2.Under the App Features heading, locate Sensors.
- 3.Click the ⊕ symbol next to Sensor.
- 4.Select Location Sensor from the provided menu.
- 5.Click Add.
You will see a settings panel where you can set the properties of the Location Sensor before clicking Submit.
The Location Sensor returns a user's current location in
longitudeas well as a
locationobject which includes additional properties like
heading(or direction) which you have to retrieve with the object blocks above