1 (edited by d.brylenko 2017-02-20 11:04:33)

Topic: Possible Drawing API bug in newest version

Hello,

I have a simple script that moves map position to user location that looks something like this:

    void Update()
    {
        if (enableMapMovement)
        {
            mapMovementAngle += Time.deltaTime / time;

            if (mapMovementAngle > 1)
            {
                OnlineMaps.instance.zoom = 17;
                enableMapMovement = false;
                mapMovementAngle = 1;
            }

            OnlineMaps.instance.position = Vector2.Lerp(lastMapPosition, userLocation.position, mapMovementAngle);
            OnlineMaps.instance.Redraw();
        }
    }

    public void MoveMapToUser()
    {
        if (userLocation.inMapView && enableMapMovement == false)
        {
            lastMapPosition = OnlineMaps.instance.position;
            mapMovementAngle = 0;
            enableMapMovement = true;
        }
        else
        {
            OnlineMaps.instance.position = userLocation.position;
            OnlineMaps.instance.zoom = 17;
            OnlineMaps.instance.Redraw();
        }
    }

It was working fine, but afer I updated to the newest OnlineMaps version (2.5.2.1) it doesn't work. Is there any changes in APIs that could cause this?

Re: Possible Drawing API bug in newest version

Hello.

Based on your code, I made a test script (attached), and it works well for all controls.
Perhaps the problem is a little bit more specific?!

Post's attachments

Attachment icon TestMovement.cs 1.44 kb, 296 downloads since 2017-02-21 

Kind Regards,
Infinity Code Team.

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

Re: Possible Drawing API bug in newest version

Thanks for your reply, Alex. I'll try to dig up more, maybe I'm missing something.