-
-
Notifications
You must be signed in to change notification settings - Fork 841
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
MapLibre support #1571
MapLibre support #1571
Conversation
thanks @mfazekas 🙇🏿 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for this 👍🏿
tested with styleUrl
pointed to mapbox ('mapbox://styles/mapbox/dark-v10'
) with a valid accesstoken and got these errors.
Not sure if related though 😕
Maybe just logger spam - posting nevertheless
ERROR Mapbox error Requesting: Requesting: %@ failed with error: %@ failed with error: <MGLNetworkConfiguration: 0x600001743f00> {"filePath": "-[MGLNetworkConfiguration errorLog:]", "level": "error", "line": 129, "message": "Requesting: Requesting: %@ failed with error: %@ failed with error: <MGLNetworkConfiguration: 0x600001743f00>"}
ERROR Mapbox error [event]:Setup [code]:-1 [message]:loading style failed: unsupported URL {"filePath": "virtual bool mbgl::MGLCoreLoggingObserver::onRecord(mbgl::EventSeverity, mbgl::Event, int64_t, const std::string &)", "level": "error", "line": 30, "message": "[event]:Setup [code]:-1 [message]:loading style failed: unsupported URL"}
ERROR Mapbox error Requesting: Requesting: %@ failed with error: %@ failed with error: <MGLNetworkConfiguration: 0x600001743f00> {"filePath": "-[MGLNetworkConfiguration errorLog:]", "level": "error", "line": 129, "message": "Requesting: Requesting: %@ failed with error: %@ failed with error: <MGLNetworkConfiguration: 0x600001743f00>"}
ERROR Mapbox error [event]:Style [code]:-1 [message]:Failed to load source composite: unsupported URL {"filePath": "virtual bool mbgl::MGLCoreLoggingObserver::onRecord(mbgl::EventSeverity, mbgl::Event, int64_t, const std::string &)", "level": "error", "line": 30, "message": "[event]:Style [code]:-1 [message]:Failed to load source composite: unsupported URL"}
I guess we could elegantly move the two ENV Vars related to MapLibre usage within iOS together, instead of having two needed in the future?
Cheers 🍻
@@ -98,6 +98,9 @@ Pod::Spec.new do |s| | |||
|
|||
s.subspec 'DynamicLibrary' do |sp| | |||
sp.source_files = "ios/RCTMGL/**/*.{h,m}" | |||
if $RNMGL_USE_MAPLIBRE | |||
sp.compiler_flags = '-DRNMGL_USE_MAPLIBRE=1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain how this is relevant?
Haven't seen this come up again in your changes - does MapLibre require this somehow?
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It defines RNMGL_USE_MAPLIBRE
preprocessor macro, so we can do #ifdef RNMGL_USE_MAPLIBRE
in code
Well one variable can be used to consume MapLibre or even Mapbox via SPM. |
With the changes introduced through #1571 we can switch back to 5.12.0 per default now 👍🏿
* fix(iOS): pin mapLibre back to `5.12.0` With the changes introduced through rnmapbox#1571 we can switch back to 5.12.0 per default now 👍🏿 * update Changelog
@ferdicus The errors you mention here, I believe are caused by URLs prefixed "mapbox://" being interpreted as file paths.. Similar to "file://". On device iOS the style completely fails to load when these errors occur however 🤔 |
@doylemark Did you ever solve the above? I'm on rnmapbox 8.5.0 + mapLibre 5.12.1. Same problem whether I implement I'm really fascinated by your observation on the file path - is there a solve? |
@ferdicus - I'm having this on my project now (see versions above) - in my case, it's preventing the map tiles from rendering/loading at all. Wondering whether you have any new intel on this since your post ~6 months ago? Symptoms are that the map is not loading at all - though it's misleading because some devices will load it from a local cache. New installs on new devices always fail to render the map, however. I'm on Apple Silicon - the root of all trouble & joy. ;) |
Description
Fixes #1472
MapLibre 5.12 support
Note the following should be added to Podfile for
MapLibre 5.12
support.