GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
France region and toponym names  XML
Forum Index -> Administrative Divisions
Author Message
vidda



Joined: 09/06/2012 13:06:00
Messages: 1
Offline

Hi and thanks for this great web service

However, i have some problems to retrieve "real french region names" correctly.

For datas, sent in JSON format i use what follows:

Code:
 data :
 { q : 'france',  // just for example
   featureClass :"A",  
   featureCode : "ADM1",
   lang : 'fr',
   name_startsWith : request.term, // i use autocomplete jquery ui widget
   maxRows : 10, // doesn't matter, i'll try to use jscrollpane later for a complete list
   username : 'myregisteredname' // just for example
         }
 

then I use AdminName1 to display my autocomplete list.
but when i want to get region starting with 'i', i get 'Bretagne'. When i look the JSON response (firebug), i see toponym name saying 'Istor Breizh' explaining why have this result, while i would like to get ONLY adminName1 matches.
I understood what 'tag' does but it won't work assuming that i'm only asking for name_startswith.
I tryed with other requests and the problem is the same.

My question is: what should i do to retrieve only adminname matches instead of toponymnames. Should i declare a javascript regex function for that or is there any functionnality i missed?

I guess this probleme would be the same for other countries. In my data example, "france" if a text input value that could be different.

Please heeeeeelp
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

Hi

The service returns all features that have at least on e name starting with the desired string. You have to filter the result if you only want features that match some additional rules.

Best

Marc

[WWW]
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team