diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-01-29 15:12:59 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-01-29 15:13:54 +0100 |
commit | d4865dcbcdccdce59f07b324f230a1f1991aa39d (patch) | |
tree | e337c2f282db1e9ea41cb83e6b4441443e836140 | |
parent | 83b3d67175f16057844e5719bcda56eeb74560f3 (diff) | |
download | jquery-ui-d4865dcbcdccdce59f07b324f230a1f1991aa39d.tar.gz jquery-ui-d4865dcbcdccdce59f07b324f230a1f1991aa39d.zip |
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
-rw-r--r-- | demos/autocomplete/remote-jsonp.html | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/demos/autocomplete/remote-jsonp.html b/demos/autocomplete/remote-jsonp.html index 3cd718862..cb178d3c9 100644 --- a/demos/autocomplete/remote-jsonp.html +++ b/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 ); } }); }, |