Topic: hook for when map position restored after timeout

Hi Alex, at risk of showing my ignorance (again).
Is there a way to call a routine after the map position has been moved by a Restore After (sec) timeout.

If not I have added a crude one:

OnlineMapsLocationServiceBase: approx line  40
    /// <summary>
    /// This event called after map position restored when timeout "Restore After" expires
    /// </summary>
    public Action OnPositionRestored; // added 4 lines

OnlineMapsLocationServiceBase: approx line 397,
after "restore after" ticks  ...
_allowUpdatePosition = true;
UpdatePosition();
OnPositionRestored(); //added 1 line

and for reference: used by subscription
OnlineMapsLocationServiceBase.baseInstance.OnPositionRestored += OnPositionRestored;

public void OnPositionRestored()
{
        //Debug.Log("Position restored");
}

Have I done this correctly ?

Re: hook for when map position restored after timeout

Hello.

Thanks for the suggestion.
I think this is a very useful hook.
The next version of Online Maps will contain this.

Kind Regards,
Infinity Code Team.

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

Re: hook for when map position restored after timeout

woo hoo, thankyou.
PS I was getting worried that I was doing more wrong things. smile