1 (edited by danielesuppo 2019-04-26 17:50:58)

Topic: Issues with version 3.x - Version 2.x was better?....

Hello, the title is ironic, I'm pretty sure that the new version is better than the previous one,
but I've just upgraded OnlineMaps from 2.x to 3.x on my old project, and I have some problems:

1) The map seem to load slower than before. Maybe it's just a my impression but I've both projects open, and at Start the one with OnlineMaps 2.x it's quicker (a couple of seconds) to load and update the map on zoom...

2) I've placed some Gameobjects on the map, relative to their longitude and latitude: I was used to update their positions (when the map is zoomed or panned) with this very simple code:

public Vector2 longitudeLatitude;

    private void OnEnable()
    {
        OnlineMaps.instance.OnChangeZoom += UpdatePosition;
        OnlineMaps.instance.OnChangePosition += UpdatePosition;
    }

    private void Start()
    {
        UpdatePosition();
    }


    void UpdatePosition()
    {
        if (longitudeLatitude != Vector2.zero)
            transform.position = OnlineMapsTileSetControl.instance.GetWorldPosition(longitudeLatitude);
    }

The problem is that the new position is not accurate. When I pan the map my Gameobjects "shake" a little around the correct position. With OnlineMaps 2.x the new position was perfect and everyhing was very smooth.

3) The Actions "OnChangeZoom" and "OnChangePosition" are not called on "OnEnable" (NullReferenceException: Object reference not set to an instance of an object)
I have to put them on Start, but it's quite an issue for me.

Can you help me on all this?
Thanks

Re: Issues with version 3.x - Version 2.x was better?....

Hello.

1. Theoretically, v3 should be faster.

2. It is very difficult to say what is wrong.
Here need to test the whole project.
Try using OnlineMapsControlBaseDynamicMesh.OnMeshUpdated instead of OnChangeZoom and OnChangePosition.

3. In any version of Online Maps you cannot access map scripts from OnEnable or Awake.
It has always worked this way, and this is written in the documentation.

Kind Regards,
Infinity Code Team.

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

Re: Issues with version 3.x - Version 2.x was better?....

Thank-you for your reply,

1 - maybe it's my network.

2 - I've did a very simple test with the provided scene "Tileset (Recommended for most cases)", just with a new Gameobject and the previous script attached to it, and the issue is still there.
This issue (shaking) does not happen with the same simple scene (only the Map and a Gameobject) on version 2.x

3 - Sorry, I didn't read all the documentation, and since it was working on 2.x I had idea that it was a 3.x problem

Please could you make a quick test for the issue n.2 ?
Many thanks!

3 -

Re: Issues with version 3.x - Version 2.x was better?....

Send your project to us (support@infinity-code.com). I'll check what's wrong.

Kind Regards,
Infinity Code Team.

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

Re: Issues with version 3.x - Version 2.x was better?....

Thank-you so much! The project is very simple, just your default scene with a Gameobject and a script attached.

6 (edited by danielesuppo 2019-04-26 19:37:57)

Re: Issues with version 3.x - Version 2.x was better?....

I've just sent you the project with Wetransfer.
You can open the scene file "TestScene with issue"
It's just the very basic scene with the map and one Gameobjects (named "Placeholder").
The position of the Placeholder is updated through the previous script.
As you will see as you pan the map the position of the Placeholder shake, you can see it better if you zoom in the map.
This issue didn't happen with the previous release

7 (edited by danielesuppo 2019-04-27 11:39:54)

Re: Issues with version 3.x - Version 2.x was better?....

Well.. as you suggested using OnlineMapsControlBaseDynamicMesh.OnMeshUpdated  seem to do the job (no more shake),
But I'd curious to know what's going on.

Re: Issues with version 3.x - Version 2.x was better?....

Thanks for the project.

The problem has been fixed.
The new version will be available through the built-in update system on Monday.

Kind Regards,
Infinity Code Team.

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

Re: Issues with version 3.x - Version 2.x was better?....

Great!
Many thanks