181
Views
2
Comments
conditional assigning. HOW?
Question

Hi,


With the LocationPLugin component, I get my location in the onInitialize function of my screen.

Then I want to initialize my Google map I want to see if location is null and if it isn't, set the map to the currentLocation.


Two questions:

How to check if GPS is enabled?

How to formulate a correct function for my lat/long of the Google map?

If(CurrentLocation === NullIdentifier(), 51.035959, CurrentLocation.Latitude)

is wrong




2024-04-24 19-28-09
Justin Babel

Hi Lars,

For the 'if' statement, the correct syntax is only one '='.

Justin

2017-05-09 08-17-10
Lars De Pauw

Thank you Justin.

Now my problem is that Longitude is a decimal, how can I check if this is null or not? And is there documentation about how to use the Expression Editor? I'd like to look things up myself instead of having to come back to the forums for every question.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.