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