-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
Using Maptiler for style of the map crash the app after warning #1939
Comments
@gustaflindqvist this is a warning not a crash, and yes you can use |
@gustaflindqvist I couldn't tell from your original question, but did you solve the issue with the View crashing? I have styleURL working on first render but crashes anytime View is re-rendered. |
Yeah, I removed the |
interesting... I'm not using <>
<View style={styles.page}>
<View style={styles.container}>
<SettingsToggle />
<MyLocation />
<MapView
style={styles.map}
scaleBarEnabled={false}
attributionPosition={{
bottom: 50,
left: 5,
}}
compassViewPosition={0}
logoEnabled={false}
styleURL={activeBasemap}
>
<UserLocation
visible={true}
showsUserHeadingIndicator={true}
onUpdate={(location) => drawRoute(location)}
/>
{terrainStatus && (
<RasterDemSource
id="mapbox-dem-2"
url="mapbox://mapbox.mapbox-terrain-dem-v1"
tileSize={514}
maxZoomLevel={22}
>
<Terrain />
</RasterDemSource>
)}
<Camera
centerCoordinate={[
currentLocation.longitude,
currentLocation.latitude,
]}
zoomLevel={14}
followUserLocation={followStatus}
followPitch={cameraPitchStatus ? 45 : 0}
followZoomLevel={17}
followUserMode={trackUpStatus ? "course" : "normal"}
animationMode={"flyTo"}
/>
<RouteLines />
</MapView>
</View>
</View>
<RecordSheet />
</> |
to future readers: this issue was caused from using LineGradient in my LineLayer component. |
@jjrise Might also be good to check is app has permission before using |
Since I can't get map and Street style to work in my project, so now I use Maptiler style instead. I had the same issue as #1840. Maptiler style has support for Mapbox, so this workaround works until I encounter this warning message in the iOS Simulator and then the app will crash every time the view is loaded.
I have cleared the cache deintegrate pods, and install pods again etc.
I have added
hasFinishedLoadingStyle
to see if that fix the problem and then apply theCamera
andMapView
:Is there a way to use the
setLogCallback
to ignore the messages to avoid the app to crash?The text was updated successfully, but these errors were encountered: