Topic: What if I want to get more than one Place Type?

Hello.

What if I want to get more than one Place Type?
I wrote the following but could not get it.

OnlineMapsGooglePlaces.FindNearby(
            apiKey,
            new OnlineMapsGooglePlaces.NearbyParams(
                longitude, // Longitude
                latitude, // Latitude
                5000) // Radius
                {
                types = "church|park"
            }).OnComplete += OnComplete;

Re: What if I want to get more than one Place Type?

Hello.

I just checked Google Places API documentation and now type only takes one value and all the following are ignored.
https://developers.google.com/places/we … chRequests

Kind Regards,
Infinity Code Team.

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

Re: What if I want to get more than one Place Type?

I understand, thanks for the reply.

Re: What if I want to get more than one Place Type?

Hello.

One more question came up.
I couldn't figure out how to switch the icon image for each type if I can't search for multiple types at the same time.

I have created a class that contains "Image" and "Type".
PunBB bbcode test

I used a For statement in the "PoiIcon class" array to search for each type.
PunBB bbcode test

However, I could not find a way to set the texture corresponding to the type in "OnComplete".
PunBB bbcode test

Please let me know if you have a better solution.

Re: What if I want to get more than one Place Type?

C# has many ways to do this, for example, through closures:

// ...
Texture2D image = PoiIcons[i].Image;
// ...
}).OnComplete += s => OnComplete(s, image);
// ...
private void OnComplete(string s, Texture2D Image)
// ...
Kind Regards,
Infinity Code Team.

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

Re: What if I want to get more than one Place Type?

I was able to do it successfully.
Thank you very much, it was very helpful.