@aibee/crc-bmap 0.8.106 → 0.8.107
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/lib/index.cjs +3 -3
- package/lib/index.esm.min.js +3 -3
- package/lib/index.js +3 -3
- package/lib/index.online.esm.min.js +3 -3
- package/lib/platform/wrapper.cjs +3 -3
- package/lib/platform/wrapper.esm.min.js +3 -3
- package/lib/platform/wrapper.js +3 -3
- package/lib/platform/wrapper.online.esm.min.js +3 -3
- package/lib/src/bmap.js +1 -1
- package/lib/src/factory/text-texture.js +2 -2
- package/lib/src/layer/poi-layer2.js +3 -3
- package/lib/src/loader/AibeeLoader/layer.js +3 -1
- package/package.json +1 -1
package/lib/src/bmap.js
CHANGED
|
@@ -83,7 +83,7 @@ export class BMap extends EventDispatcher {
|
|
|
83
83
|
const basicZoom = this.context.camera.zoom;
|
|
84
84
|
// 设置zoom
|
|
85
85
|
this.context.control.minZoom = basicZoom;
|
|
86
|
-
this.context.control.maxZoom = basicZoom *
|
|
86
|
+
this.context.control.maxZoom = basicZoom * 25;
|
|
87
87
|
if (this.type === "3d") {
|
|
88
88
|
this.context.fitCameraToGround(this.config.defaultPadding, 0, false);
|
|
89
89
|
}
|
|
@@ -264,12 +264,12 @@ export class TextTextureFactory {
|
|
|
264
264
|
const mergedOptions = this.getMergedOptions(options);
|
|
265
265
|
const originHeight = mergedOptions.height;
|
|
266
266
|
mergedOptions.height = Math.min(originHeight * texts.length, 2048);
|
|
267
|
-
if (window.OffscreenCanvas) {
|
|
267
|
+
if (false && window.OffscreenCanvas) {
|
|
268
268
|
console.log("use webworker");
|
|
269
269
|
// 用webworker
|
|
270
270
|
const promise = this.getTextsByWorker(texts, mergedOptions, originHeight);
|
|
271
271
|
return promise;
|
|
272
|
-
} else if (typeof window.requestIdleCallback === "function") {
|
|
272
|
+
} else if (false && typeof window.requestIdleCallback === "function") {
|
|
273
273
|
// 不支持 在浏览器空闲时间绘制
|
|
274
274
|
console.log("use browser idle");
|
|
275
275
|
const promise = this.getTextsByBrowserIdle(texts, mergedOptions, originHeight);
|
|
@@ -98,12 +98,12 @@ export class PoiLayer2 extends Layer {
|
|
|
98
98
|
const m4 = camera.projectionMatrix.clone();
|
|
99
99
|
m4.multiply(camera.matrixWorldInverse);
|
|
100
100
|
const currentWeight = camera.zoom / this.context.basicZoom;
|
|
101
|
-
|
|
101
|
+
console.log("currentWeight", currentWeight);
|
|
102
102
|
const pois = this.pois.filter((item)=>{
|
|
103
103
|
if (item.visible) {
|
|
104
104
|
var _item_spriteIcon, _item_spriteText;
|
|
105
|
-
// 先判断zoom在不在范围内
|
|
106
|
-
if (!(currentWeight <= item.options.maxWeight && currentWeight >= item.options.minWeight)) {
|
|
105
|
+
// 先判断zoom在不在范围内 0.1 容错,计算误差
|
|
106
|
+
if (!(currentWeight <= item.options.maxWeight + 0.1 && currentWeight >= item.options.minWeight - 0.1)) {
|
|
107
107
|
item.parentSetVisible(false);
|
|
108
108
|
return false;
|
|
109
109
|
}
|
|
@@ -234,7 +234,9 @@ export function facilityLayerPoi(layer, floor, locale, showText) {
|
|
|
234
234
|
export async function parkingSpaceLayerPoi(layer, floor) {
|
|
235
235
|
const elements = layer.elements.filter((options)=>options.texts[0]);
|
|
236
236
|
const texts = elements.map((options)=>options.texts[0]);
|
|
237
|
-
const offsetMap = await TextTextureFactory.lazyGetTextureByTexts(texts
|
|
237
|
+
const offsetMap = await TextTextureFactory.lazyGetTextureByTexts(texts, {
|
|
238
|
+
height: 64
|
|
239
|
+
});
|
|
238
240
|
elements.forEach((options)=>{
|
|
239
241
|
try {
|
|
240
242
|
const text = options.texts[0];
|