Update leaflet geocoder.

This commit is contained in:
David Molineus
2015-06-18 16:26:12 +02:00
parent b18d76f61e
commit 4ddb52925d
7 changed files with 43 additions and 9 deletions

View File

@@ -323,7 +323,7 @@
if (a.city || a.town || a.village) {
parts.push('<span class="' + (parts.length > 0 ? 'leaflet-control-geocoder-address-detail' : '') +
'">{postcode} {city}{town}{village}</span>');
'">{postcode} {city} {town} {village}</span>');
}
if (a.state || a.country) {
@@ -620,6 +620,10 @@
});
},
suggest: function(query, cb, context) {
return this.geocode(query, cb, context);
},
reverse: function(location, scale, cb, context) {
L.Control.Geocoder.getJSON(this.options.service_url + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', {
access_token: this._access_token,