GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
searchJSON failed  XML
Forum Index -> General
Author Message
lord_icon



Joined: 06/08/2013 08:28:40
Messages: 1
Offline

Hi,

so far I have used the following code.

Code:
 	<script>
 	<!--
 	$(document).ready(function(){
 	
 		$(function() {
 			$("#city").autocomplete({
 			   source: function( request, response ) {
 				 $.ajax({
 				  url: "http://ws.geonames.org/searchJSON",
 				  dataType: "jsonp",
 				  data: {
 					featureClass: "P",
 					style: "full",
 					maxRows: 20,
 					name_startsWith: request.term,
 					country: $("#country :selected").val(),
 					username: "<?php echo $geonameusr; ?>"
 				  },
 				  success: function( data ) {
 					response( $.map( data.geonames, function( item ) {
 					  return {
 					  label: item.name + (item.adminName1 ? ", " + item.adminName1 : ""),
 					  value: item.name,
 					  str: item.lat+"|"+item.lng+"|"+item.timezone.timeZoneId+"|"+encodeURIComponent(item.name)+"|"+encodeURIComponent(item.adminName1)+"|"+encodeURIComponent(item.countryName)+"|"+encodeURIComponent(item.countryCode)
 					  }
 					}));
 				  }
 				 });
 				},
 			  minLength: 2,
 			  select: function( event, ui ) {
 				  window.location = "<?php echo $pagename.'?auswahl='; ?>"+ui.item.str;
 			  }
 		
 			});		
 		});
 	
 	});
 	//-->
 	</script>
 



But since recent time I do not get back more disclosures latitudes.

Was part geonames what changed?
marc



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

the first I see is that you are using a deprecated server url. The ws.geonames.org server is deprecated, you should use the server api.geonames.org and add a username:
http://geonames.wordpress.com/2011/01/28/application-identification-for-free-geonames-web-services/


Marc

[WWW]
drupaldev



Joined: 21/01/2014 22:39:22
Messages: 1
Offline

I have similar code using the "http://ws.geonames.org/searchJSON" url that has stopped working. What is the new URL that I should use? Are there any other changes to the code that need to happen?

Thanks
Citiz'Art



Joined: 23/01/2014 08:37:04
Messages: 1
Offline

Dear Folks,
I've the same issue : the search with url http://ws.geonames.org is broken. Results given is url does exist. ? How can we fixe the search ?
Thanks a lot for quick help.

domdd



Joined: 24/01/2014 11:50:01
Messages: 3
Offline

Hi,

I have the same issue with the url.

Everything was working fine but now the city search are not present anymore.

I am not a programmer myself so I asked my programmer but would require another link or many hours to change everything

Can you tell what we should do to make it work ? If its just the link that is different, could you tell us what is it?

Thanks
domdd



Joined: 24/01/2014 11:50:01
Messages: 3
Offline

Anybody found a solution?

Still have the same issue - the auto complete (or pick list) does not work

Need help pls

Thanks
marc



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

The domain ws.geonames.org was deprecated three years ago:
http://geonames.wordpress.com/2011/01/28/application-identification-for-free-geonames-web-services/


Regards

[WWW]
domdd



Joined: 24/01/2014 11:50:01
Messages: 3
Offline

OK I will pass it to my programmer! THank you very much
sentarou235


[Avatar]

Joined: 07/03/2014 09:55:52
Messages: 1
Offline

I have similar code using the "http://ws.geonames.org/searchJSON" url that has stopped working

juegos de detectives - videojuegos y consolas
[WWW]
friendly



Joined: 06/06/2014 13:18:41
Messages: 1
Offline

new url: http://api.geonames.org/searchJSON
ne pas oublier/ don't forget:
username: "username"

to get you free user name register here: http://www.geonames.org/login
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team