Mobile Mapbox is not getting displayed

Mobile Maps is not getting displayed on an iOS device with JS expressions for lat and long. Although renders correctly in the browser preview.

And here is the mobile preview:

Putting static coordinates eliminates the problem

Thanks for reporting @Scottsky -- we'll work on a fix. This is likely related to lat/long being undefined at initialization time.

In the meantime can you try {{ ?? 0}} and the same for the longitude input? That should do the trick, LMK if not.

1 Like

Thank you for your quick response.
I thought it bounces off 'undefined' selector field so made sure to set first option as default. Sadly it did not help.
Changing the expression to {{ ?? 0}} Unfortunately no effect.

I have some time before this sprint ends.
Might as well wait till it gets fixed.

Hey @Scottsky! To piggy-back off bca's workaround here a bit, does it work to pass {{parseFloat( || 0}}?

I'm curious what the return value of is, does the component work properly if you press "reload" under the error message?

1 Like

[quote="Kabirdas, post:4, topic:23067"]
{{parseFloat( || 0}}
[/quote] This actually did the trick. Thank you.

[quote="Kabirdas, post:4, topic:23067"]
return value of
[/quote] is an array of: * 0 "18.4207"

[quote="Kabirdas, post:4, topic:23067"]
does the component work properly if you press "reload" under the error message?
[/quote] - NOPE tried it.

1 Like

Got it, thanks for that additional context!

Hey @Scottsky! It looks like this issue no longer reproduces after some recent changes for mobile, if you see that it's still popping up without the workaround please let us know!

1 Like

I just noticed mobile map did change.
Coordinates are returned correctly now.

And looks like the default zoom button got added. And it defaults to 0.

Just noticing that previous default zoom level 5 or 6 and it had a nice 'fly to' effect to it that everybody liked. Thank you for bringing it to my attention I set the default zoom level back to 5. But I can imagine getting grief from users that would be 'pinching with 2 fingers from 0 to 5 on a phone screen if I would not have noticed it.

Suggestion: set the default to 5 rather than zero?

It got broken over the weekend again in a wired way.
It works just as expected on the desktop preview of a mobile app.
But on a mobile device (ios) Switching coordinated does not refresh the map.

Am I doing something wrong, or there is something happening with the component?

Fresh update:
Actual mobile device screen in question.
Desktop app preview works fine.

Although default view is clearly set to Hawaii it still defaults to San Francisco. Although not a single coordinate leads here. On changing project coordinates map used to focus to the place. Now it doesn't.

Thanks for flagging this again! I'm wondering if some of the behavior reverted, does using the parseFloat method still work for you or is that broken as well?

parseFloat works as a workaround.
Map reports an error with it. But it doesn't affect performance.

:arrow_forward: Error:value must be an array.

in sensor_selector.setValue()

in MapScreen load event handler(MapScreen)

from user interaction