maplibre-react-native
maplibre-react-native copied to clipboard
Local sprite not found
Describe and reproduce the Bug
I am defining local sprite in the map config. The sprite is loaded using the expo-asset library, but when used I get an error:
MapLibre error [event]:Style [code]:-1 [message]:Failed to load sprite: {"filePath": "virtual bool mbgl::MLNCoreLoggingObserver::onRecord(EventSeverity, Event, int64_t, const std::string &)", "level": "error", "line": 30, "message": "[event]:Style [code]:-1 [message]:Failed to load sprite: "}
mapStyle.ts
{
sprite: `file:///${FileSystem.bundleDirectory}sprite`,
version: 8,
I have used Image component to test is the sprite in the bundle directory and it is.
@maplibre/maplibre-react-native Version
10.0.0
Which platforms does this occur on?
iOS Simulator
Which frameworks does this occur on?
Expo
Which architectures does this occur on?
New Architecture
Environment
expo-env-info 1.2.2 environment info:
System:
OS: macOS 15.2
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
Watchman: 2024.11.18.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.16.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2
IDEs:
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: 52.0.19 => 52.0.19
expo-router: ~4.0.13 => 4.0.13
react: 18.3.1 => 18.3.1
react-dom: 18.3.1 => 18.3.1
react-native: 0.76.5 => 0.76.5
react-native-web: ~0.19.10 => 0.19.13
Expo Workflow: bare