Permalink
Browse files

Autocomplete: Update remote-jsonp demo with working geo webservice

The previous webservice now requires user credentials. The new one is also
in use in a jQuery Mobile demo.

Fixes #9764
  • Loading branch information...
jzaefferer committed Jan 29, 2014
1 parent 83b3d67 commit d4865dcbcdccdce59f07b324f230a1f1991aa39d
Showing with 3 additions and 11 deletions.
  1. +3 −11 demos/autocomplete/remote-jsonp.html
@@ -27,21 +27,13 @@
$( "#city" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
url: "http://gd.geobytes.com/AutoCompleteCity",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
maxRows: 12,
name_startsWith: request.term
q: request.term
},
success: function( data ) {
response( $.map( data.geonames, function( item ) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name
}
}));
response( data );
}
});
},

0 comments on commit d4865dc

Please sign in to comment.