0

we are building an ionic app to show layers on maps using openlayers. Everything is working well on android but on ios when we load the second project we will have the following warning. warning: Total canvas memory use exceeds the maximum limit (224 MB)

I googled it, I think that the problem on ios is caching canvas of the map and when exceed the 224MB the app don’t crash but all layers are hidden on map and gives the above warning.

So is there any way to not cache canvas on ios using ionic? or is there any way also in openlayers?

I will appreciate your help.

thank you in advance.

4

2 回答 2

0

我找到了一种解决方法,尝试始终将画布内存保持在其最大限制以下,以避免在 VectorTile 图层中出现渲染问题,我在这里创建了一个拉取请求

于 2022-01-31T16:46:09.273 回答
0

只需通过将地图上的多个静态图层组合成服务器端的单个图像(例如 GeoServer)来减少在画布上绘制的项目总数,然后将其绘制为平铺图层。

关于相同的内存使用问题也有类似的问题,但是您的 ionic 应用程序中的画布应该由 Openlayer 封装,使得提到的解决方法不太可能适用于您的情况。

于 2020-06-05T07:54:14.647 回答