You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terrainNode.fetchTerrainTexture("mapbox/satellite-v9", zoom: 14, progress: { _, _ in }, completion: { image in
terrainNode.geometry?.materials[4].diffuse.contents = image // here
})
In the console I receive tons of following informations: 2018-08-28 13:46:51.938021+0200 AppName[1937:978808] [Unknown process name] CGBitmapContextInfoCreate: unable to allocate 608605984 bytes for bitmap data
The text was updated successfully, but these errors were encountered:
This issue and Issue #33 have the same root cause. Since the SDK right now uses a fixed zoom level of 12 when asking for tiles regardless of the lat/lon bounds that are being rendered, there are problems when the lat/lon bounds exceed some threshold. The image API will request the necessary number of tiles at zoom level 12 that are needed to cover the request bounds. When it tries to stitch all those tiles together into a single CGImage for the terrain image or heightmap image, if the resultant CGImage would exceed the allowable size then no image is created and we'll later crash because of it.
I have an experimental fix for this that dynamically calculates the zoom level while trying to minimize the size of the final image. I don't think it's quite ready to merge into master, but I'll put it up as a PR for everyone to check out.
Crash happens when trying to fetch a larger map size.
MapboxImageAPI.swift line 227:
what later affects:
In the console I receive tons of following informations:
2018-08-28 13:46:51.938021+0200 AppName[1937:978808] [Unknown process name] CGBitmapContextInfoCreate: unable to allocate 608605984 bytes for bitmap data
The text was updated successfully, but these errors were encountered: