Topic: turning on/off map interactivity at runtime

Hello, maybe the answer is somewhere within the API but I could not find it.

In some situations, i have to temporarily block any interactivity on map (zoom, drag, marker clicks,etc.) while keeping it active e.g. when i partially hide the map behind a popup with semi-transparent background. However, in this example, despite having raycast blocked by my background, the map keeps being interactive.
I ve solved it by removing/adding interaction event listeners from OnlineMapsRawImagTouchForward (because just disabling it provokes errors). But while reconsidering it, I find this solution to be an overkill.

So is there a switch somewhere to do that, that i may have missed? Or would it be possible to add one (maybe just adding a test for a boolean value at the beginning of the interaction management functions)?

Thanks a lot.

Re: turning on/off map interactivity at runtime

Hello.

Unfortunately, there is no way to completely block the interaction with the map.
I agree that this can be very useful in some cases and will add it next week.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: turning on/off map interactivity at runtime

Super. Thanks a lot. Let me know when it s available.

Re: turning on/off map interactivity at runtime

I remember my promise to add a feature for you, and I will definitely do so.
But unfortunately, I was sick for a few days, and all my plans for this week (including a big update for another asset I have been working on for several months, and your feature) have been delayed for a few days.
If I can, I will release an update for Online Maps towards the end of the week, if not, then at the beginning of next week.
And I will let you know when it's released.
Thank you for your patience.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: turning on/off map interactivity at runtime

I implemented something similar in my project. This at least turns off/on the camera scroll and zoom:

OnlineMapsTileSetControl.instance.allowUserControl = value;
OnlineMapsTileSetControl.instance.allowZoom = value;

Re: turning on/off map interactivity at runtime

The new version is already available through the built-in update system.
The new version will be available in the Asset Store in 48 hours.

Use OnlineMaps.blockAllInteractions to block all user interactions, including interactions with the map, tooltips, markers, drawing elements.
But you can still interact with the map using the API.
https://infinity-code.com/doxygen/onlin … c7450c0595

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: turning on/off map interactivity at runtime

Super. Thanks a lot.

PS: hope you re better. smile

8 (edited by emmanuel.g.blanchard 2021-05-14 03:05:41)

Re: turning on/off map interactivity at runtime

Hey, quick follow-up on this.

Trying to implement my blocking stuff now (had no time to do it earlier) but the blockAllInteractions does not seem to be present in the release currently available through the package manager.

in the package manager, when looking at release details, the fix is mentioned in notes of release 3.7.10.1 from April 12... but there is a 3.7.10 release (the current one) with no note on April 13th. Is it possible you overrode the release?

Edit : updated the package with the built in system and it works fine. During so, it seems the built-in system recognized the version i had just installed from the package manager as 3.7.8.1.

Re: turning on/off map interactivity at runtime

This is a bug in the package manager:
https://issuetracker.unity3d.com/issues … le-updates
To fix the problem, update Unity Editor or remove the downloaded package from the Asset Store-5.x folder.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.