LocationSensor - where is the LocationChanged event?


I’m trying to use the LocationSensor in a test app I’m making to evaluate Thunkable.

Basically the app will display a map which is centered, and sized at 50% x 50% of the screen. And show some text beneath the map. This part of the app I managed to make without problems.

I added a LocationSensor and from that I read the current location and write that to the map using the “when(Screen1) opens” event. This also works fine.

But now I want the map to move when I move and reflect my current location at all times. I expected the LocationSensor to have something like a LocationChanged event or similar but it doesn’t. In fact it has no events whatsoever, only properties.

So how am I supposed to get notified and update the map as the user moves?

Michael Berg

Sooooooo I think I have an idea about what might be wrong here.

It seems there are (at least) two versions of Thunkable. One which is cross platform an another which is Android only. There might be an iOS version as well, haven’t seen or tried that yet though.

The Android only version is what they call Thunkable Classic for some reason. And it has its own designer with many, many more components to pick from. Nice but confusing I have to admit. Two different pieces of documentation for each kind of component means you get sidetracked quite a bit. Also why is it that in compatibility mode the locationsensor doesn’t have a locationchanged? Is that not supported on iOS?

There are also two different apps for this. One which is cross platform and another which is android only. Apparently one needs both of these apps and they don’t run eachothers live preview. I would think that on Android you would only need one app for the cross platform code and the android specific code but oh well.

Don’t mean to sound grumpy just a few thoughts from a new user :slight_smile: Still need help with the location sensor. It keeps returning hasLatLong=false (with provider gps).

  • Michael