No event when Map ShowUser = false

When I set the Map ShowUser parameter to false, the LocationSensor.LocationChanged event does not occur.

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

No need screenshot. If ShowUser is false LocationSensor.LocationChanged never called. If ShowUser is true the program is working fine.

Do you use custom map markers in your app? If you do set ShowUsers from properties strange things happen when you set the ShowUser icon using Map Properties with some Blocks.

see

Custom Map User Icon - #7 by SteveJG for another example. Evidently using ShowUser creates issues depending on what Blocks are used in the app. I don't know whether this is an MIT feature or intentional.

The ShowUser definitely is not wired correctly and buggy in certain circumstances. :slight_smile:

Without screenshot we only can can guess what you are doing.
The map component and location sensor component are independent from each other
EDIT: no, see @SteveJG's contribution below

From the documentation

ShowUser
Shows or hides an icon indicating the user’s current location on the Map. The availability and accuracy of this feature will depend on whether the user has location services enabled and which location providers are available.

But probably you found a bug? Without any example blocks we never will know

Taifun

I believe this

locationLocationap
makes them dependant. :slight_smile:

1 Like

Ok, I did some testing and here's the results.

I added a LocationSensor componenet to the Map.
I set ShowUser false.

If the Map parameter LocationSensor is None, then working.
If the parameter is the added LocationSensor, then no event.
If the parameter is the added LocationSensor and I set ShowUser true, then working.

Scratching my head :confused: