aboutsummaryrefslogtreecommitdiffstats
path: root/demos/autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'demos/autocomplete')
-rw-r--r--demos/autocomplete/remote-jsonp.html14
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 );
}
});
},