Topic: string topic name To Victor2D Position

hi
i got from  OnlineMapsGooglePlacesAutocompleteResult []results array,
how to convert every part of this array  To Victor2D Position .
i was trying to use :
Vector2 geocoding = OnlineMapsGoogleGeocoding.GetCoordinatesFromResult(result.description);
but  OnlineMapsGoogleGeocoding.GetCoordinatesFromResult does not provide the necessary XML structure that GetCoordinatesFromResult can parse for coordinates.
how can i do it ?

Re: string topic name To Victor2D Position

Hi.

Google Places Autocomplete API returns place identifiers, but not locations.
https://developers.google.com/maps/docu … _responses
To get a location, you need to make a request to Google Places Details API.
https://infinity-code.com/doxygen/onlin … b9795d0c1d

Kind Regards,
Infinity Code Team.

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

Re: string topic name To Victor2D Position

Hi
How To limit OnlineMapsGooglePlacesAutocomplete results to locations within a specific country?
how to assign request.componentsin in this syntax OnlineMapsGooglePlacesAutocomplete.Find(inputField.text).OnComplete += OnAutocompleteComplete; doesnt work

Re: string topic name To Victor2D Position

Vector2 location = new Vector2(8.6038408f, 48.17016f); 
        
OnlineMapsGooglePlacesAutocomplete.Find("rot", 
    new OnlineMapsGooglePlacesAutocomplete.Params
    {
        location = location,
        radius = 10000
    }).OnComplete += OnRequestComplete;

Also, you can use components.
https://developers.google.com/maps/docu … components

Kind Regards,
Infinity Code Team.

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

Re: string topic name To Victor2D Position

i used it like that but it stop giving me any result
OnlineMapsGooglePlacesAutocomplete.Find(inputField.text,googleAPIKey,null,-1,default,-1,null, "us", null).OnComplete += OnAutocompleteComplete;

Re: string topic name To Victor2D Position

What do you have in this case?
Is this code giving you an exception or is the server returning some kind of error?

Kind Regards,
Infinity Code Team.

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

Re: string topic name To Victor2D Position

nothinggggg .
and it doesn't return any results "topics"

Re: string topic name To Victor2D Position

Add Log component, enable Request Events, make a request and see in the console the request url (check that it is valid) and the response from the server (often the server will tell you directly what is wrong).

Kind Regards,
Infinity Code Team.

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

Re: string topic name To Victor2D Position

if i use it like that : OnlineMapsGooglePlacesAutocomplete.Find(inputField.text).OnComplete += OnAutocompleteComplete; it gives me results
but if i use it like that : OnlineMapsGooglePlacesAutocomplete.Find(inputField.text).OnComplete += OnAutocompleteComplete;
            //OnlineMapsGooglePlacesAutocomplete.Find(inputField.text,googleAPIKey,null,-1,default,-1,null, "us", null).OnComplete += OnAutocompleteComplete;
it doesnt respond .. almost in the debug there is nothing wrong . but no results
is there any wrong in this syntax : OnlineMapsGooglePlacesAutocomplete.Find(inputField.text).OnComplete += OnAutocompleteComplete;
            //OnlineMapsGooglePlacesAutocomplete.Find(inputField.text,googleAPIKey,null,-1,default,-1,null, "us", null).OnComplete += OnAutocompleteComplete;

Re: string topic name To Victor2D Position

That's because you're using components incorrectly.
https://developers.google.com/maps/docu … components
Instead of "us" it should be "country:us".

Kind Regards,
Infinity Code Team.

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