ios - 传单图像覆盖在 iOS 12 上无法完全正常工作
问题描述
我的 PWA(使用 Leaflet 1.5.1)目前在 Android 和 iOS 上运行(自 2 年以来)没有问题,直到 iOS 12 发布。从那时起,我在 iPhone 和 iPad 上遇到了非常奇怪的问题。
主要问题是图像叠加层没有在 iOS 设备上完全呈现。
我正在设置一组叠加层:
ovl = loadOverlay(url);
overlay.push(ovl);
哪里loadOverlay()
是:
function loadOverlay(imgurl) {
bounds = new L.LatLngBounds(
new L.LatLng(30, -10),
new L.LatLng(50, 36)
);
var ovl = new L.ImageOverlay(imgurl,
bounds, {
pane: 'imagebg',
attribution: "my attribution"
});
return ovl;
}
然后,每个叠加层都以这种方式显示:
startMap() {
mymap = new L.Map('CopMap', {
maxZoom: 6.50,
minZoom: 4.75,
zoomSnap: 0.25,
zoomDelta: 0.25,
zoomControl: false,
maxBounds: [
//south west
[32.5, -4.],
//north east
[46.8, 31]
],
crs: L.CRS.Simple
});
mymap.attributionControl.setPrefix('');
mymap.createPane('imagebg');
mymap.getPane('imagebg').style.zIndex = 1;
mymap.addLayer(overlay[iDX]);
}
这在 Android 上运行良好,而在 iOS 中,图像没有完全渲染(并非总是如此,但经常如此)。我已检查图像文件是否已正确下载到缓存中,但未完全显示。
解决方案
推荐阅读
- terraform - Terraform 在导入当前状态后询问“ami”和“instance_type”
- azure - 无法在 terraform azure 提供程序中获取 SystemAssigned 身份属性
- excel - Excel - 基于另一列的公式链接单元格
- google-maps - Mackbook safari location 一次又一次询问,即使我允许了
- android - W/BiChannelGoogleApi:[FirebaseAuth:] getGoogleApiForMethod() 返回 Gms:com.google.firebase.auth.api.internal.zzal@395d2a7 错误
- forms - Codeignter 3图像上传代码不起作用
- javascript - 无需单击按钮即可将数据视图移动到 javascript
- javascript - 当前周 + 1 每当点击下一个
- mysql - Mysql 使用任务计划程序导入 csv 或使用命令提示符计划任务
- react-native - 收到此错误:错误:捆绑失败:错误:无法解析模块`react-native-safe-area-context`