@aibee/crc-bmap 0.8.110 → 0.8.111

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.
@@ -30,11 +30,11 @@ export function transformLayers(layer, floor, options) {
30
30
  export function transformLayersPoi(layer, floor, locale, placeConfig) {
31
31
  switch(layer.l_type){
32
32
  case "store":
33
- return storeLayerPoi(layer, floor, locale, placeConfig.showStoreName);
33
+ return storeLayerPoi(layer, floor, locale, placeConfig);
34
34
  case "facility":
35
- return facilityLayerPoi(layer, floor, locale, placeConfig.showFacilityName);
35
+ return facilityLayerPoi(layer, floor, locale, placeConfig);
36
36
  case "parkingSpace":
37
- return parkingSpaceLayerPoi(layer, floor);
37
+ return parkingSpaceLayerPoi(layer, floor, placeConfig);
38
38
  }
39
39
  }
40
40
  /**
@@ -148,7 +148,7 @@ export function transformLayersPoi(layer, floor, locale, placeConfig) {
148
148
  floor.userData.graphicMap.set(options.id, graphic);
149
149
  });
150
150
  }
151
- export function storeLayerPoi(layer, floor, locale, showText) {
151
+ export function storeLayerPoi(layer, floor, locale, placeConfig) {
152
152
  layer.elements.map((options)=>{
153
153
  try {
154
154
  const text = getStoreTextByLocale(options, locale);
@@ -166,9 +166,10 @@ export function storeLayerPoi(layer, floor, locale, showText) {
166
166
  24
167
167
  ],
168
168
  level: options.poi_info.level || 0,
169
- hide_text: !showText,
169
+ hide_text: !placeConfig.showStoreName,
170
170
  maxWeight: options.poi_info.maxWeight || 25,
171
- minWeight: options.poi_info.minWeight || 1
171
+ minWeight: options.poi_info.minWeight || 1,
172
+ text_font_size: placeConfig.textFontSize
172
173
  });
173
174
  floor.poiLayer2.pushPoi(poi);
174
175
  if (poi) {
@@ -190,7 +191,7 @@ export function storeLayerPoi(layer, floor, locale, showText) {
190
191
  floor.userData.graphicMap.set(options.id, graphic);
191
192
  });
192
193
  }
193
- export function facilityLayerPoi(layer, floor, locale, showText) {
194
+ export function facilityLayerPoi(layer, floor, locale, placeConfig) {
194
195
  const elements = layer.elements.filter((item)=>item.poi_info);
195
196
  elements.map((options)=>{
196
197
  try {
@@ -209,9 +210,10 @@ export function facilityLayerPoi(layer, floor, locale, showText) {
209
210
  24
210
211
  ],
211
212
  level: options.poi_info.level || 0,
212
- hide_text: !showText,
213
+ hide_text: !placeConfig.showFacilityName,
213
214
  maxWeight: options.poi_info.maxWeight || 25,
214
- minWeight: options.poi_info.minWeight || 1
215
+ minWeight: options.poi_info.minWeight || 1,
216
+ text_font_size: placeConfig.textFontSize
215
217
  });
216
218
  floor.poiLayer2.pushPoi(poi);
217
219
  poi.userData.type = "facility";
@@ -231,7 +233,7 @@ export function facilityLayerPoi(layer, floor, locale, showText) {
231
233
  // @deprecated 下个版本删除尽量不要用
232
234
  floor.userData.parkingSpacesGraphicMap = floor.parkingSpaceLayer.graphicMap;
233
235
  }
234
- export async function parkingSpaceLayerPoi(layer, floor) {
236
+ export async function parkingSpaceLayerPoi(layer, floor, placeConfig) {
235
237
  const elements = layer.elements.filter((options)=>options.texts[0]);
236
238
  const texts = elements.map((options)=>options.texts[0]);
237
239
  const offsetMap = await TextTextureFactory.lazyGetTextureByTexts(texts, {
@@ -252,7 +254,8 @@ export async function parkingSpaceLayerPoi(layer, floor) {
252
254
  text_texture_width: offsetMap[text].width,
253
255
  text_texture_height: offsetMap[text].height,
254
256
  text_texture_offset_x: offsetMap[text].x,
255
- text_texture_offset_y: offsetMap[text].y
257
+ text_texture_offset_y: offsetMap[text].y,
258
+ text_font_size: placeConfig.textFontSize
256
259
  });
257
260
  if (poi) {
258
261
  poi.userData.type = "parkingSpace";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.8.110",
3
+ "version": "0.8.111",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.min.js",