Author |
Message |
07/08/2013 08:00:16
|
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?
|
|
|
25/08/2013 10:15:23
|
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
|
|
|
|
21/01/2014 23:03:15
|
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
|
|
|
24/01/2014 07:46:50
|
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.
|
|
|
25/01/2014 08:13:31
|
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
|
|
|
27/01/2014 23:05:12
|
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
|
|
|
27/01/2014 23:05:12
|
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
|
|
|
|
30/01/2014 18:25:44
|
domdd
Joined: 24/01/2014 11:50:01
Messages: 3
Offline
|
OK I will pass it to my programmer! THank you very much
|
|
|
07/03/2014 22:05:12
|
sentarou235
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
|
|
|
09/06/2014 11:19:12
|
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
|
|
|
|