<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Inconsistent FindNearby Results]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=105</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=105&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Inconsistent FindNearby Results.]]></description>
		<lastBuildDate>Wed, 09 Mar 2016 19:35:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=446#p446</link>
			<description><![CDATA[<p><a href="https://developers.google.com/places/supported_types?hl=en">https://developers.google.com/places/su … ypes?hl=en</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 09 Mar 2016 19:35:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=446#p446</guid>
		</item>
		<item>
			<title><![CDATA[Re: Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=445#p445</link>
			<description><![CDATA[<p>Is there a way to know what&#039;s considered a valid value for «types»? A list somewhere, maybe?</p>]]></description>
			<author><![CDATA[null@example.com (Quidam)]]></author>
			<pubDate>Wed, 09 Mar 2016 19:31:41 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=445#p445</guid>
		</item>
		<item>
			<title><![CDATA[Re: Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=444#p444</link>
			<description><![CDATA[<p>When you use an incorrect value «types», Google Places API ignores it, and looking for the result as if this parameter is not specified.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 09 Mar 2016 18:52:28 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=444#p444</guid>
		</item>
		<item>
			<title><![CDATA[Re: Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=443#p443</link>
			<description><![CDATA[<p>Thanks! I wasn&#039;t paying proper attention to the different parameter types and had just copied the example code where you specifically search for a type. Now that I&#039;m passing in my search terms through the keyword parameter things seem to be working as expected. I see now that the searches which were working were for terms that were more of a type than a name or a keyword.</p><p>I&#039;m curious, though: if I was passing in values in the «types» parameter that weren&#039;t yielding any results, why was I getting the same list over and over? Shouldn&#039;t I have got an empty set?</p>]]></description>
			<author><![CDATA[null@example.com (Quidam)]]></author>
			<pubDate>Wed, 09 Mar 2016 18:44:17 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=443#p443</guid>
		</item>
		<item>
			<title><![CDATA[Re: Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=442#p442</link>
			<description><![CDATA[<p>Hello.</p><p>What do you want to find?<br />Most likely Search Field.text contains the name of the place, right?<br />In this case, you use the wrong parameter (the sixth parameter is «types»).<br />You need to use a keyword (4) or the name (5) parameters.</p><p><a href="https://developers.google.com/places/web-service/search?hl=en#PlaceSearchRequests">https://developers.google.com/places/we … chRequests</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 09 Mar 2016 18:17:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=442#p442</guid>
		</item>
		<item>
			<title><![CDATA[Inconsistent FindNearby Results]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=441#p441</link>
			<description><![CDATA[<p>I&#039;m adapting the SearchNearby example code in my project and I&#039;m having some inconsistent behavior. Sometimes a search term I&#039;ll use will give me the markers I expect, but in many other cases I get a result set that doesn&#039;t seem to have any unifying theme. It&#039;s almost as if I&#039;m getting a result set from a blank search- just a list of the things nearest the search focus.</p><p>Can you see anything wrong with my code? Any ideas as to what might be causing this?</p><div class="codebox"><pre><code>        public void SearchNearby()
        {
            Debug.Log(SearchField.text);

            OnlineMapsFindPlaces.FindNearby(
                OnlineMaps.instance.position,
                4000,
                &quot;[Key Removed for Forum Post]&quot;, // &lt;----------------------------- Google API Key
                null,
                null,
                SearchField.text).OnComplete += OnFindComplete;
        }</code></pre></div><div class="codebox"><pre><code>        private void OnFindComplete(string s)
        {
            OnlineMapsFindPlacesResult[] results = OnlineMapsFindPlaces.GetResults(s);
            if (results == null)
            {
                Debug.Log(&quot;Error&quot;);
                Debug.Log(s);
                return;
            }

            // Clear the existing find results
            OnlineMaps.instance.RemoveAllMarkers();
            
            List&lt;OnlineMapsMarker&gt; markers = new List&lt;OnlineMapsMarker&gt;();
            foreach (OnlineMapsFindPlacesResult result in results)
            {
                // Debug.Log(result.name);
                // Debug.Log(result.location);

                OnlineMapsMarker marker = OnlineMaps.instance.AddMarker(result.location, result.name);
                marker.OnClick += OnMarkerClick;
                markers.Add(marker);

            }

            Vector2 center;
            int zoom;
            OnlineMapsUtils.GetCenterPointAndZoom(markers.ToArray(), out center, out zoom);

            OnlineMaps.instance.position = center;
            OnlineMaps.instance.zoom = zoom + 1;
        }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Quidam)]]></author>
			<pubDate>Wed, 09 Mar 2016 17:59:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=441#p441</guid>
		</item>
	</channel>
</rss>
