@bmlt-enabled/croutonjs 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crouton-core.css +28 -4
- package/crouton-core.min.css +1 -1
- package/crouton-gmaps.js +133 -25
- package/crouton-gmaps.min.js +7 -7
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +14 -13
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.css +28 -4
- package/crouton.js +147 -38
- package/crouton.min.css +1 -1
- package/crouton.min.js +6 -6
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +133 -25
- package/crouton.nojquery.min.js +6 -6
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
package/crouton-map.js
CHANGED
|
@@ -349,24 +349,25 @@ function addControl(div,pos,cb) {
|
|
|
349
349
|
q: query,
|
|
350
350
|
limit: 5,
|
|
351
351
|
format: 'json',
|
|
352
|
-
addressdetails: 1
|
|
352
|
+
addressdetails: 1,
|
|
353
|
+
layer: "address"
|
|
353
354
|
},
|
|
354
355
|
params
|
|
355
356
|
),
|
|
356
357
|
L.bind(function(data) {
|
|
357
|
-
var results = [];
|
|
358
358
|
if (data && data.length) {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
359
|
+
results = data.reduce(function(carry, d) {
|
|
360
|
+
if (!carry.find((item) => item.name === d.display_name)) {
|
|
361
|
+
var bbox = d.boundingbox.map((c) => parseFloat(c));
|
|
362
|
+
carry.push({
|
|
363
|
+
name: d.display_name,
|
|
364
|
+
bbox: L.latLngBounds([bbox[0], bbox[2]], [bbox[1], bbox[3]]),
|
|
365
|
+
center: L.latLng(d.lat, d.lon),
|
|
366
|
+
properties: d
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return carry;
|
|
370
|
+
}, []);
|
|
370
371
|
cb(results);
|
|
371
372
|
} else {
|
|
372
373
|
alert ( crouton.localization.getWord("address_lookup_fail") );
|