How do I disable mapbox scroll zoom feature?

Hello,

One of many questions to come (I'm sure). Can I please get some assistance from the brains trust with regards to disabling the annoyingly slow mapbox scroll zoom feature in Retool on load? All documentation seems to point to it being something you can achieve in mapbox however I would like to know if this is possible to achieve in Retool without having to go back to the source.

Many thanks for any and all assistance,

Gus.

Hi @Augustine_Whitehouse

are you talking about the internal MapBox component or a custom component with MapBox source code?

The internal one doesn't behave as you describe.

Best

I'm not sure which is which but I'm talking about the mobile app MapBox component

Hello @Augustine_Whitehouse!

Could you share a video of the mapbox scroll zoom on mobile app load?

I tried recreating it and it loads in at the Zoom specified in the Inspect pannel at the bottom under the 'Appearance' tab.

@Jack_T - I just stumbled upon this post as I am having a similar/same problem (I think). I posted it here: Mapbox Scroll Zoom and Point Layer Order with the video

1 Like

Sure thing - RPReplay_Final1717384391.MP4 - Google Drive

Thank you for sharing the video @Augustine_Whitehouse!

That is very odd behavior for the map component, any chance you could share a screen shot of the map component's Inspect view?

I am assuming you are creating a pin based on the animal info the user selects and then the map is receiving the pin's coordinates slightly after the component renders, causing it to move.

I will look into this as @darenhunter has a similar issue. I am hoping that we can easily set the start pin/location coordinates for the map component before it renders.

So that it doesn't try to auto set its view to coordinates 0 0 and then receive data to set pins and zoom to them.

1 Like

I got ahead of myself and thought this fixed it. It doesn't. Can't get the map to initialize with anything other than null on device

1 Like

@Augustine_Whitehouse Is it possible for you to drop in and join our office hours to live debug?

I was trying to replicate but my map does not zoom. Here is more info on our office hours which will be held tomorrow. Hopefully we can live troubleshoot/debug this zooming issue!

Hi Jack, I may have missed todays session, is there another coming up?

Hey @Augustine_Whitehouse and @darenhunter!

You have not missed it, will be starting in the 30 mins!

One option would be this workaround.

{{parseFloat(get_project_latitude.data?.latitude) || 0}} and then you can try replacing the zero with the hard coded coordinates you want.

More details about a user with a similar issue here hopefully it helps.

Also under Appearance set Zoom to a higher number. My maps also start zoomed out until I increased the zoom number, not much more I can do besides adding a feature request for fixed load in zoom on hard coded lat/long.

1 Like

The other option would be to use the map's display functionality to set it's Hidden property to hide the map until the lat/long values are available. A slight time delay might be enough to keep the map from loading in without values :sweat_smile: