Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map behaves different if style uses asset:// links #3196

Open
boldtrn opened this issue Feb 3, 2025 · 0 comments
Open

Map behaves different if style uses asset:// links #3196

boldtrn opened this issue Feb 3, 2025 · 0 comments
Labels

Comments

@boldtrn
Copy link
Collaborator

boldtrn commented Feb 3, 2025

MapLibre iOS Version

6.11.0

iOS Version

18.2.1

Device

iPhone 11 Pro

What happened?

In our app we add several layers on top of the map, after didFinishLoadingStyle. When changing our style from "glyphs": "https://URL/fonts/{fontstack}/{range}.pbf" to "glyphs": "asset://map/glyphs/{fontstack}/{range}.pbf". It seems to be especially PointLayers, LineLayers seem to work well.

There are warnings in the console like (these warnings are shown after didFinishLoadingStyle fires ):

Task <475C0C4E-2D05-4007-99DF-C5E89C11AB67>.<66> finished with error [-1100] Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo={NSLocalizedDescription=The requested URL was not found on this server., NSErrorFailingURLStringKey=file://map/glyphs/Noto%20Sans%20Regular/61440-61695.pbf, NSErrorFailingURLKey=file://map/glyphs/Noto%20Sans%20Regular/61440-61695.pbf, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <475C0C4E-2D05-4007-99DF-C5E89C11AB67>.<66>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <475C0C4E-2D05-4007-99DF-C5E89C11AB67>.<66>, NSUnderlyingError=0x301329200 {Error Domain=kCFErrorDomainCFNetwork Code=-1100 "(null)"}}

(to note as well, the log shows a file:// url, the style uses the asset url)

The map itself loads fine though.

If we only change the sprite url, we still see the errors in the console, but the layers seem to be added as expected.

My current theory is that the asset urls create a timing issue in didFinishLoadingStyle, so that method fires too early or something like that, and therefore layers added are added in the wrong order or not at all?

Steps to reproduce

Use asset links in the style. I am sorry that I don't have a better reproducible example.

@boldtrn boldtrn added the iOS label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant