-
-
Notifications
You must be signed in to change notification settings - Fork 858
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
[Bug]: Mapbox error StyleSource.removeFromMap #3179
Comments
@JClackett thanks for the report. Can you repro the same issue with the posted example? I don't see twcRadar in the example. Also please test with latest betas. |
Will try latest beta! |
Still there, not really sure how to give a repro as im using a private source with api key, <RasterSource
id="twcRadar"
tileSize={256}
tileUrlTemplates={[
`https://api.weather.com/v3/TileServer/tile/radarEurope?ts=<a-unix-timestamp>&xyz={x}:{y}:{z}&apiKey=<my-api-key>`,
]}
/>
<RasterLayer sourceID="twcRadar" id="radar" style={{ rasterOpacity: 0.4 }} /> |
Find a raster layer source on the internet the doesn't require password like bellow, and also add a switch, so it changes styleUrl. And verify that you can reproduce the issue on the example you're posting. import React from 'react';
import {
Images,
MapView,
RasterLayer,
RasterSource,
Camera,
} from '@rnmapbox/maps';
const styles = {
matchParent: { flex: 1 },
};
export default function RasterSourceExample() {
return (
<MapView style={styles.matchParent}>
<Camera
defaultSettings={{
centerCoordinate: [-74.00597, 40.71427],
zoomLevel: 14,
}}
/>
<RasterSource
id="stamen-watercolor"
titleSize={256}
tileUrlTemplates={['https://tile.openstreetmap.org/{z}/{x}/{y}.png']}
/>
<RasterLayer
id="stamen-watercolor-layer"
sourceID="stamen-watercolor"
style={{ rasterOpacity: 0.85 }}
/>
</MapView>
);
} |
Closing this will reopen if someone provides a component that reproduces the issue. |
@mfazekas, isn't it possible to just remove or add layers explicitly? I am also getting a similar error when a layer is not present anymore on my map: |
Mapbox Implementation
Mapbox
Mapbox Version
default
Platform
iOS, Android
@rnmapbox/maps
version10.0.15
Standalone component to reproduce
Observed behavior and steps to reproduce
When changing the styleUrl when I have active layers/sources, mapbox throws the error:
Expected behavior
The layer persists and doesn't throw an error
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: