Skip to content

Commit dd0df9e

Browse files
committed
Latest fixes from gh-pages
1 parent 1b9c53a commit dd0df9e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Control.Geocoder.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,12 @@
255255
key : this.key
256256
}, function(data) {
257257
var results = [];
258-
for (var i = data.resourceSets.resources.length - 1; i >= 0; i--) {
259-
var resource = data.resourceSets.resources[i];
258+
for (var i = data.resourceSets[0].resources.length - 1; i >= 0; i--) {
259+
var resource = data.resourceSets[0].resources[i],
260+
bbox = resource.bbox;
260261
results[i] = {
261262
name: resource.name,
262-
bbox: L.latLngBounds(resource.bbox),
263+
bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]),
263264
center: L.latLng(resource.point.coordinates)
264265
};
265266
}
@@ -268,8 +269,8 @@
268269
},
269270
});
270271

271-
L.Control.Geocoder.bing = function() {
272-
return new L.Control.Geocoder.Bing();
272+
L.Control.Geocoder.bing = function(key) {
273+
return new L.Control.Geocoder.Bing(key);
273274
};
274275

275276
L.Control.Geocoder.RaveGeo = L.Class.extend({
@@ -321,5 +322,10 @@
321322
}
322323
});
323324

325+
L.Control.Geocoder.raveGeo = function(serviceUrl, scheme, options) {
326+
return new L.Control.Geocoder.RaveGeo(serviceUrl, scheme, options);
327+
};
328+
329+
324330
return L.Control.Geocoder;
325331
}));

0 commit comments

Comments
 (0)