<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Problem with service findNearbyJSON"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Problem with service findNearbyJSON"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Problem with service findNearbyJSON</title>
				<description><![CDATA[ Hi everybody

I have problem with findNearbyJSON web-service
I'm requesting it with such parameters in jQuery

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
$.ajax&#40;{
        url: "http://api.geonames.org/findNearbyJSON",
        dataType: 'json',
        data: {
          lat: pos.lat&#40;&#41;,
          lng: pos.lng&#40;&#41;,
          featureClass: 'P',
          featureCode: &#91;'PPLA','PPLA2', 'PPLA3', 'PPLA4'&#93;,
          username: 'user_name',
          style: 'MEDIUM',
          lang: 'local',
          radius: 20,
          maxRows: 40
        },
        jsonp: false,
        jsonpCallback: "callbackName",
        success: on_city_found_callback
      }&#41;;
</pre>
		</div>

Now I wonder why in response I get places with FeatureCode PPL and other. I want only those featureCodes that I provide in array when requesting service? Can somebody help me with that?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2534.page#9345</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2534.page#9345</link>
				<pubDate><![CDATA[Mon, 14 Mar 2011 17:40:05]]> GMT</pubDate>
				<author><![CDATA[ street_traveler]]></author>
			</item>
			<item>
				<title>Re:Problem with service findNearbyJSON</title>
				<description><![CDATA[ Are you sure you tried this code?

In the logfiles I see a couple of requests like this:
featureClass=P&featureCode=PPLC&featureCode=PPLA&featureCode=PPLA2&featureCode=PPLA3&featureCode=PPLA4&featureCode=PPL&

It is explicitly asking for PPL

Best

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2534.page#9374</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2534.page#9374</link>
				<pubDate><![CDATA[Mon, 14 Mar 2011 18:25:41]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:Problem with service findNearbyJSON</title>
				<description><![CDATA[ Hi. I solve this couple days ago so I post a solution to all who use jQuery with geonames.

In general jQuery by default when serializing parameters use for arrays notation with braces[]. This is in general ok for php server side engine. But Java, jsp, servlet containers didn't understand such notatnion with braces so the solution is to add one parameter in ajax method: 
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
traditional:true
</pre>
		</div>
I think that on geonames they are using some Java technology so this is the solution for jQuery.
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
$.ajax&#40;{
         url: "http://api.geonames.org/findNearbyJSON",
         dataType: 'json',
         traditional: true,
         data: {
           lat: pos.lat&#40;&#41;,
           lng: pos.lng&#40;&#41;,
           featureClass: 'P',
           featureCode: &#91;'PPLA','PPLA2', 'PPLA3', 'PPLA4'&#93;,
           username: 'user_name',
           style: 'MEDIUM',
           lang: 'local',
           radius: 20,
           maxRows: 40
         },
         success: on_city_found_callback
       }&#41;;
</pre>
		</div>]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2534.page#9382</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2534.page#9382</link>
				<pubDate><![CDATA[Tue, 15 Mar 2011 15:11:25]]> GMT</pubDate>
				<author><![CDATA[ street_traveler]]></author>
			</item>
	</channel>
</rss>