schmi85
Joined: 13/11/2010 14:50:45
Messages: 3
Offline
|
Hello!
I am new to this forum, so I hope that this is the right place for my little question and please tell me if not.
Actually I trying to built an autocompletion based on placenames. After checking the documentation I found the SEARCH webservice and after some tries I found all the data in the response i need for my project.
The plan is, to load the data for all places, when the the second letter is typed. So just because this completion should work for a single country there are not too much results for each request, but there can be more then 1000 results. The problem is, when I start the first request with the following url:
http://ws.geonames.org/search?q=&name_startsWith=we&featureClass=P&lang=DE&country=DE&style=FULL&continentCode=EU&maxRows=1000&startRow=0
The <totalResultsCount>1924</totalResultsCount> tells me that there are nearly 2000 results. Checking the xml with firebug shows me that there are exact 1000 results, what is really fine. Request size is limited to 1000 results, so I have to start another request with, I think, the following url to get the last 924 results:
http://ws.geonames.org/search?q=&name_startsWith=we&featureClass=P&lang=DE&country=DE&style=FULL&continentCode=EU&maxRows=1000&startRow=1001
In this case the respone has only 199 <geoname> childs, even if there should be 924. I tried this with maximum rows of 100, 10 and 20 and always the pagination failed to give me last results. I even tried to get all results based on the first letter of the placename and there are mostly more than 3000 results, but I can never get more than 1199 results in total.
Does anybody know why this happens?? I don't think that my requests are wrong, I just think that maxRows and startRow do not behave in the way I expect, so does anybody has a clue what i am doing wrong??
greetings
philipp
|