|
@@ -935,8 +935,14 @@ export default defineComponent({
|
|
|
// console.log(leftTop)
|
|
|
|
|
|
const rightBottom = locations.reduce((carry, next) => {
|
|
|
- if (carry.length === 0) return next;
|
|
|
- return [Math.max(carry[0], next[0]), Math.min(carry[1], next[1])];
|
|
|
+ // if (carry.length === 0) return next;
|
|
|
+ // return [Math.max(carry[0], next[0]), Math.min(carry[1], next[1])];
|
|
|
+ if (carry.length <= 1) return next;
|
|
|
+ if (next.length <= 1) return carry;
|
|
|
+ var x = Math.max(carry[0], next[0]);
|
|
|
+ var y = Math.min(carry[1], next[1]);
|
|
|
+
|
|
|
+ return [x < 118 ? 118 : x, y > 35 ? 35 : y < 30 ? 30 : y];
|
|
|
}, []);
|
|
|
|
|
|
const leftTopBounds: number[][] = new window.minemap.LngLat(...leftTop)
|