Topic: Errors after the upgrade

Hi,

I have upgraded from v3 to newest one and got three errors (two are identical) as follows:

'OnlineMapsCache' does not contain a definition for 'OnStartDownloadTile' and no accessible extension method 'OnStartDownloadTile' accepting a first argument of type 'OnlineMapsCache' could be found (are you missing a using directive or an assembly reference?)

Assets\Infinity Code\Online maps\Examples\Scripts\ExampleGUI.cs(65,44): error CS1503: Argument 1: cannot convert from 'string' to 'OnlineMapsGoogleGeocoding.RequestParams'

Assets\Infinity Code\Online maps\Examples\Scripts\ExampleGUI.cs(86,44): error CS1503: Argument 1: cannot convert from 'string' to 'OnlineMapsGoogleGeocoding.RequestParams'

Post's attachments

Attachment icon ExampleGUI.cs 4.72 kb, 117 downloads since 2019-11-25 

Re: Errors after the upgrade

Hello.

In Online Maps v3.0, we marked many APIs obsolete so that all users had time to fix these warnings.
In Online Maps v3.6, we removed the obsolete APIs.

1. OnlineMapsCache.OnStartDownloadTile no longer exists.
Now you do not need to manage OnStartDownloadTile in several places.
Use only OnlineMapsTileManager.OnStartDownloadTile.

2. Use OnlineMapsGoogleGeocoding constructor.
Example:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

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

Re: Errors after the upgrade

Thank you but I need to use Google AutocompleteApi to get suggestions for the location after the first search executed, those suggestions should be listed in a dropdown. Then the user select the desired one in the list and now the map goes to the selected location. Could you please direct me to make the script that I attached work again like that?

Re: Errors after the upgrade

Replace

OnlineMapsGoogleGeocoding.Find(search).OnComplete += delegate ...

to

OnlineMapsGoogleGeocoding request = new OnlineMapsGoogleGeocoding(search, googleApiKey);
request.OnComplete += delegate ... 
request.Send();
Kind Regards,
Infinity Code Team.

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

5 (edited by mimarilker 2019-11-26 12:48:12)

Re: Errors after the upgrade

I am trying to get Buildings from OSM, it was very fast before. Now I can clearly see the download process of every single building, it is now 40x slower. On the other hand, OnlineMapsGoogleGeocoding.Find(search).OnComplete += delegate ... has not been resolved. There is no error in Unity but the dropdown list is empty, please see the attached script. Thank you for your suggestions and support.

Post's attachments

Attachment icon ExampleGUI.cs 4.48 kb, 90 downloads since 2019-11-26 

Re: Errors after the upgrade

Original:

OnlineMapsGoogleGeocoding request = new OnlineMapsGoogleGeocoding(search, apiKey);
request.OnComplete += delegate (string s)
{
  request.Send();
};

Fixed:

OnlineMapsGoogleGeocoding request = new OnlineMapsGoogleGeocoding(search, apiKey);
request.OnComplete += delegate (string s)
{
  // Here is the contents of your original delegates, from the script in post # 1.
}
request.Send();

Unfortunately, it’s hard for me to comment on your message about buildings loading speed.
Between Online Maps v3.0 and 3.6, nothing fundamentally changed in building loading.

Kind Regards,
Infinity Code Team.

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

Re: Errors after the upgrade

Thank you, I will try it and inform you. As to 'Building' loading issue, could you please test it? There should be a difference, I haven't changed anything except replacing "OnlineMapsCache.OnStartDownload" with "OnlineMapsTileManager.OnStartDownload". Otherwise it was giving errors. Do you think this may the cause of the slow down issue?

Re: Errors after the upgrade

In Buildings example scene on my side, the request takes about 1 second, and the buildings are shown immediately afterwards.

It’s hard to say what the problem is, because at least I don’t know your settings.
For example, I saw screenshots (from other users) where Buildings / Zoom Range is [15 - 20], which forces the OSM server to generate a response of about 100 megabytes, and reading data from such a response is also very slow.
I am not saying that this is your case, because I do not know this.
But at the same time, I do not exclude that the problem may be on your side.

Kind Regards,
Infinity Code Team.

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