Skip to content

Commit d4865dc

Browse files
committed
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
1 parent 83b3d67 commit d4865dc

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

demos/autocomplete/remote-jsonp.html

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,13 @@
2727
$( "#city" ).autocomplete({
2828
source: function( request, response ) {
2929
$.ajax({
30-
url: "http://ws.geonames.org/searchJSON",
30+
url: "http://gd.geobytes.com/AutoCompleteCity",
3131
dataType: "jsonp",
3232
data: {
33-
featureClass: "P",
34-
style: "full",
35-
maxRows: 12,
36-
name_startsWith: request.term
33+
q: request.term
3734
},
3835
success: function( data ) {
39-
response( $.map( data.geonames, function( item ) {
40-
return {
41-
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
42-
value: item.name
43-
}
44-
}));
36+
response( data );
4537
}
4638
});
4739
},

0 commit comments

Comments
 (0)