- 如何使腾讯地图组件加载点位不卡顿?
<map id="map" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" markers="{{markers}}" polyline="{{polylines}}" show-location theme="satellite" style="width: 100%; height: 100%;" bindmarkertap="changeMarkerColor" bindregionchange="onRegionChange" bindtap="onMapTap" ></map> [图片] 地图上加载了1987 个点位,会非常卡顿,要如何解决? // 生成新的 markers,根据用户选择的图层来控制名称显示 let markers = filteredData.map((item, index) => { let pinName = ''; // 默认不显示 pinName // 根据选择的项目决定是否显示名称 if (item.project === '' && showPinName['']) { pinName = item.pinName; } else if (item.project === '' && showPinName['']) { pinName = item.pinName; } return { id: index + 1, latitude: item.latitude, longitude: item.longitude, iconPath: getIconPath(item.project), project: item.project, width: 15, height: 16, callout: { content: pinName, // 根据用户选择控制 pinName 是否显示 color: '#426DE5', fontSize: 12, borderRadius: 5, bgColor: '#FFFFFF', padding: 5, display: pinName ? 'ALWAYS' : 'NONE' // 如果没有名称则不显示 callout } };
02-08 - 云开发存储的图片全
[图片]没有欠费,为什么所有图片都显示不出来?
01-21 - -501001 resource system error?
云开发环境到期后没有续费,资源被释放,重新购买后调整了环境id,重新上传云函数等,云函数调用当然默认环境报错, 报错如下 cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) Error: collection.get:fail -501001 resource system error. Environment not found, there is no default environment exists, please explicitly specify the environment 当前未指定env,将默认使用第一个创建的环境! 如果使用指定环境到时没问题,可是问题出在哪里?应该怎么修改才能使用默认环境 // env: 'my-env-id', 而且通过在app.js中创建写的指定 env 还不行
2024-04-09